diff --git a/.github/workflows/autodeploy.yml b/.github/workflows/autodeploy.yml index 08c87a84..b50d93aa 100644 --- a/.github/workflows/autodeploy.yml +++ b/.github/workflows/autodeploy.yml @@ -29,8 +29,12 @@ jobs: cd coriolis-data export NVM_DIR=~/.nvm source ~/.nvm/nvm.sh + npm install + npm audit fix npm start cd ../coriolis + npm install + npm audit fix npm run build - name: Deploy the code shell: bash diff --git a/.github/workflows/manualdeploy.yml b/.github/workflows/manualdeploy.yml index 71b307fb..d997bf5f 100644 --- a/.github/workflows/manualdeploy.yml +++ b/.github/workflows/manualdeploy.yml @@ -34,8 +34,12 @@ jobs: cd coriolis-data export NVM_DIR=~/.nvm source ~/.nvm/nvm.sh + npm install + npm audit fix npm start cd ../coriolis + npm install + npm audit fix npm run build - name: Deploy the code shell: bash diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 7ca74423..9872dab4 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -5,6 +5,7 @@ const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const { InjectManifest } = require('workbox-webpack-plugin'); +const { max } = require('lodash'); module.exports = merge(common, { // devtool: 'source-map', @@ -15,12 +16,17 @@ module.exports = merge(common, { output: { globalObject: 'this' }, + performance: { + hints: false, + maxEntrypointSize: 512000, + maxAssetSize: 512000 + }, plugins: [ new CopyWebpackPlugin({ patterns: [ - 'src/.htaccess', - 'src/iframe.html', - 'src/xdLocalStoragePostMessageApi.min.js', + 'src/.htaccess', + 'src/iframe.html', + 'src/xdLocalStoragePostMessageApi.min.js', { from: 'src/schemas', to: 'schemas' }, { from: 'src/images/logo/*', @@ -42,11 +48,11 @@ module.exports = merge(common, { // overwrite: true, // appVersion: `${pkgJson.version}-${buildDate.toISOString()}` // }), - + new InjectManifest({ swSrc: './src/sw.js', swDest: 'service-worker.js' }), - + ] });