File tree Expand file tree Collapse file tree 4 files changed +64
-3
lines changed
Expand file tree Collapse file tree 4 files changed +64
-3
lines changed Original file line number Diff line number Diff line change 33 *
44 * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
55 */
6- // COPY THIS FILE TO node_modules/@labkey /build/webpack/dev.config.js
76
87const devConfig = require ( './node_modules/@labkey/build/webpack/dev.config' )
98
Original file line number Diff line number Diff line change 55 "scripts" : {
66 "setup" : " npm ci" ,
77 "build" : " npm run build-dev" ,
8- "start" : " cross-env NODE_ENV=development LK_MODULE_CONTAINER=DiscvrLabKeyModules LK_MODULE=jbrowse webpack-dev-server --config node_modules/@labkey/build/webpack/ watch.config.js" ,
8+ "start" : " cross-env NODE_ENV=development LK_MODULE_CONTAINER=DiscvrLabKeyModules LK_MODULE=jbrowse webpack-dev-server --config watch.config.js" ,
99 "build-dev" : " npm run clean && cross-env NODE_ENV=development LK_MODULE_CONTAINER=DiscvrLabKeyModules LK_MODULE=jbrowse webpack --config dev.config.js --progress --profile" ,
10- "build-prod" : " npm run clean && cross-env NODE_ENV=production PROD_SOURCE_MAP=source-map LK_MODULE_CONTAINER=DiscvrLabKeyModules LK_MODULE=jbrowse webpack --config node_modules/@labkey/build/webpack/ prod.config.js --progress --profile --colors" ,
10+ "build-prod" : " npm run clean && cross-env NODE_ENV=production PROD_SOURCE_MAP=source-map LK_MODULE_CONTAINER=DiscvrLabKeyModules LK_MODULE=jbrowse webpack --config prod.config.js --progress --profile --colors" ,
1111 "clean" : " rimraf resources/web/jbrowse/gen && rimraf resources/views/gen && rimraf resources/views/browser*" ,
1212 "test" : " cross-env NODE_ENV=test jest"
1313 },
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2019 LabKey Corporation
3+ *
4+ * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
5+ */
6+
7+ const prodConfig = require ( './node_modules/@labkey/build/webpack/prod.config' )
8+
9+ const entryPoints = require ( './src/client/entryPoints' ) ;
10+ const constants = require ( './node_modules/@labkey/build/webpack/constants' ) ;
11+ const webpack = require ( 'webpack' ) ;
12+ const NodePolyfillPlugin = require ( "node-polyfill-webpack-plugin" )
13+
14+ const clientConfig = prodConfig
15+
16+ clientConfig . resolve . fallback =
17+ {
18+ "buffer" : require . resolve ( "buffer" ) ,
19+ "path" : require . resolve ( "path-browserify" ) ,
20+ "stream" : require . resolve ( "stream-browserify" ) ,
21+ "zlib" : require . resolve ( "browserify-zlib" ) ,
22+ "vm" : require . resolve ( "vm-browserify" ) ,
23+ "fs" : false
24+ }
25+
26+ clientConfig . plugins =
27+ [ new webpack . ProvidePlugin ( { regeneratorRuntime : 'regenerator-runtime' } ) ,
28+ new NodePolyfillPlugin ( ) ] . concat ( constants . processPlugins ( entryPoints ) )
29+
30+
31+ module . exports = [ clientConfig ]
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2019 LabKey Corporation
3+ *
4+ * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
5+ */
6+
7+ const watchConfig = require ( './node_modules/@labkey/build/webpack/watch.config' )
8+
9+ const entryPoints = require ( './src/client/entryPoints' ) ;
10+ const constants = require ( './node_modules/@labkey/build/webpack/constants' ) ;
11+ const webpack = require ( 'webpack' ) ;
12+ const NodePolyfillPlugin = require ( "node-polyfill-webpack-plugin" )
13+
14+ const clientConfig = watchConfig
15+
16+ clientConfig . resolve . fallback =
17+ {
18+ "buffer" : require . resolve ( "buffer" ) ,
19+ "path" : require . resolve ( "path-browserify" ) ,
20+ "stream" : require . resolve ( "stream-browserify" ) ,
21+ "zlib" : require . resolve ( "browserify-zlib" ) ,
22+ "vm" : require . resolve ( "vm-browserify" ) ,
23+ "fs" : false
24+ }
25+
26+ clientConfig . plugins =
27+ [ new webpack . ProvidePlugin ( { regeneratorRuntime : 'regenerator-runtime' } ) ,
28+ new NodePolyfillPlugin ( ) ] . concat ( constants . processPlugins ( entryPoints ) )
29+
30+
31+ module . exports = [ clientConfig ]
You can’t perform that action at this time.
0 commit comments