mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-02 01:02:12 -04:00
chore(webpack): update to webpack 4
This commit is contained in:
parent
0416943d15
commit
de3b84b0c7
11 changed files with 41 additions and 11 deletions
|
@ -5,8 +5,10 @@ gracefulFs.gracefulify(realFs);
|
|||
|
||||
var CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
var path = require('path');
|
||||
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
module.exports = [{
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
entry: {
|
||||
horizontal: './shim/horizontal.js',
|
||||
vertical: './shim/vertical.js'
|
||||
|
@ -16,8 +18,15 @@ module.exports = [{
|
|||
libraryTarget: 'commonjs2',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: '[name].js'
|
||||
},
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
performance: {
|
||||
hints: false
|
||||
}
|
||||
}, {
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
entry: {
|
||||
horizontal: './shim/horizontal.js',
|
||||
vertical: './shim/vertical.js'
|
||||
|
@ -27,13 +36,31 @@ module.exports = [{
|
|||
libraryTarget: 'umd',
|
||||
path: path.resolve(__dirname, 'dist', 'web'),
|
||||
filename: '[name].js'
|
||||
}
|
||||
},
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
mangle: false
|
||||
}
|
||||
})
|
||||
]
|
||||
},
|
||||
plugins: []
|
||||
},
|
||||
{
|
||||
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
||||
entry: './shim/gh-pages.js',
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(__dirname, 'gh-pages')
|
||||
},
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
performance: {
|
||||
hints: false
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([{
|
||||
from: 'node_modules/google-closure-library',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue