diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..23331fd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: + push: + branches: [master] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build diff --git a/vite.config.js b/vite.config.js index 52f248e..ff99d60 100644 --- a/vite.config.js +++ b/vite.config.js @@ -18,6 +18,11 @@ export default defineConfig({ } }, rollupOptions: { + onwarn(warning) { + if (process.env.CI) { + throw new Error(warning.message); + } + }, output: { entryFileNames: 'app.js', chunkFileNames: '[name].js',