mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
1868542504
no refs `yarn build` used to throw up a lot of warnings because the webpack config was not correctly updated to use performance config for portal's usecase, this change - - Sets the `mode` to explicit `production` instead of implicit which throws a warning - Updated performance max* sizes to account for a single portal chunk bundled up as an external script
27 lines
609 B
JavaScript
27 lines
609 B
JavaScript
const path = require('path');
|
|
const glob = require('glob');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: {
|
|
'bundle.js': glob.sync('build/static/?(js|css)/main.*.?(js|css)').map(f => path.resolve(__dirname, f))
|
|
},
|
|
output: {
|
|
filename: 'portal.min.js',
|
|
path: __dirname + '/umd'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader']
|
|
}
|
|
]
|
|
},
|
|
plugins: [],
|
|
performance: {
|
|
hints: false,
|
|
maxEntrypointSize: 560,
|
|
maxAssetSize: 5600
|
|
}
|
|
}; |