webpack config for web splitted

This commit is contained in:
Zadat Olayinka 2020-10-15 16:41:18 +01:00
parent 4ef3e9e2a9
commit d503633eaf
2 changed files with 8 additions and 1 deletions

1
log-js/dist/logger.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
const path = require('path');
module.exports = {
const serverBuild = {
mode: 'production',
entry: './src/logger.js',
target: 'node',
@ -30,3 +30,9 @@ module.exports = {
extensions: ['.js'],
},
};
const webBuild = {
...serverBuild,
target: 'web',
output: { ...serverBuild.output, filename: 'logger.min.js' },
};
module.exports = [serverBuild, webBuild];