Merge pull request #6131 from afshin/webpack-production

Switch webpack to production mode
Zachary Sailer 5 years ago committed by GitHub
commit 4ddc293cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,12 +12,15 @@
"scripts": {
"bower": "bower install",
"build": "python setup.py js css",
"build:webpack": "webpack --mode development",
"build:webpack": "webpack --mode production",
"build:watch": "npm run watch",
"watch": "onchange 'notebook/static/**/!(*.min).js' 'notebook/static/**/*.less' 'bower.json' -- npm run build"
},
"devDependencies": {
"@babel/preset-env": "^7.15.0",
"@jupyterlab/apputils": "^3.1.3",
"babel-loader": "^8.2.2",
"babel-polyfill": "^6.26.0",
"bower": "^1.8.8",
"less": "~2",
"onchange": "^6.0.0",

@ -1,10 +1,27 @@
const path = require('path');
module.exports = {
entry: '@jupyterlab/apputils/lib/sanitizer',
entry: ['babel-polyfill', '@jupyterlab/apputils/lib/sanitizer'],
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'notebook/static/components/sanitizer'),
libraryTarget: "amd"
libraryTarget: "amd",
},
devtool: false,
optimization: {
minimize: false
},
module: {
rules: [
{
test: /\.m?jsx?$/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
}
}
}
]
}
}

Loading…
Cancel
Save