Deployment improvements and potential webpack fix

This commit is contained in:
Alex Williams
2024-06-22 10:48:20 +01:00
parent f7cab2e96a
commit 13d8423eb5
3 changed files with 19 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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'
}),
]
});