mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
fa43a0236b
refs https://github.com/TryGhost/Toolbox/issues/594 - this is the first of a set of commits to move our "apps" into the `apps/` folder, so we don't mix Ghost core and standalone apps
35 lines
837 B
JavaScript
35 lines
837 B
JavaScript
const path = require('path');
|
|
const glob = require('glob');
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = {
|
|
mode: 'production',
|
|
entry: {
|
|
'bundle.js': glob.sync('build/static/?(js|css)/main.*.?(js|css)').map(f => path.resolve(__dirname, f))
|
|
},
|
|
output: {
|
|
filename: 'sodo-search.min.js',
|
|
path: __dirname + '/umd'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader']
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{from: './build/static/js/main.js.map', to: './umd/sodo-search.min.js.map'}
|
|
]
|
|
})
|
|
],
|
|
performance: {
|
|
hints: false,
|
|
maxEntrypointSize: 560,
|
|
maxAssetSize: 5600
|
|
}
|
|
};
|