mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-17 09:42:39 -04:00
commit
a9a23ef589
2 changed files with 18 additions and 11 deletions
|
@ -1,9 +1,10 @@
|
|||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const defaultsDeep = require('lodash.defaultsdeep');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
const base = {
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
devServer: {
|
||||
contentBase: false,
|
||||
host: '0.0.0.0',
|
||||
|
@ -28,12 +29,14 @@ const base = {
|
|||
loader: 'file-loader'
|
||||
}]
|
||||
},
|
||||
plugins: process.env.NODE_ENV === 'production' ? [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
include: /\.min\.js$/,
|
||||
minimize: true
|
||||
})
|
||||
] : []
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
include: /\.min\.js$/
|
||||
})
|
||||
]
|
||||
},
|
||||
plugins: []
|
||||
};
|
||||
|
||||
module.exports = [
|
||||
|
@ -129,6 +132,9 @@ module.exports = [
|
|||
}
|
||||
])
|
||||
},
|
||||
performance: {
|
||||
hints: false
|
||||
},
|
||||
plugins: base.plugins.concat([
|
||||
new CopyWebpackPlugin([{
|
||||
from: 'node_modules/scratch-blocks/media',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue