File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 4
4
"private" : true ,
5
5
"scripts" : {
6
6
"build" : " webpack" ,
7
- "build:prod" : " webpack --mode=production " ,
7
+ "build:prod" : " webpack --config ./webpack.prod.config.js " ,
8
8
"clean" : " rimraf build && jlpm run clean:static" ,
9
9
"clean:static" : " rimraf -g \" ../notebook/static/!(favicons)\" " ,
10
10
"watch" : " webpack --config ./webpack.config.watch.js"
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) Jupyter Development Team.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+
6
+ const merge = require ( 'webpack-merge' ) . default ;
7
+ const config = require ( './webpack.config' ) ;
8
+ const WPPlugin = require ( '@jupyterlab/builder' ) . WPPlugin ;
9
+
10
+ config [ 0 ] = merge ( config [ 0 ] , {
11
+ mode : 'production' ,
12
+ devtool : 'source-map' ,
13
+ output : {
14
+ // Add version argument when in production so the Jupyter server
15
+ // allows caching of files (i.e., does not set the CacheControl header to no-cache to prevent caching static files)
16
+ filename : '[name].[contenthash].js?v=[contenthash]'
17
+ } ,
18
+ optimization : {
19
+ minimize : false
20
+ } ,
21
+ plugins : [
22
+ new WPPlugin . JSONLicenseWebpackPlugin ( {
23
+ excludedPackageTest : packageName =>
24
+ packageName === '@jupyterlab/application-top'
25
+ } )
26
+ ]
27
+ } ) ;
28
+
29
+ module . exports = config ;
You can’t perform that action at this time.
0 commit comments