File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
// Do this as the first thing so that any code reading it knows the right env.
2
2
process . env . BABEL_ENV = 'production' ;
3
3
process . env . NODE_ENV = 'production' ;
4
+ process . env . ASSET_PATH = '/' ;
4
5
5
6
var webpack = require ( 'webpack' ) ,
6
7
config = require ( '../webpack.config' ) ;
7
8
8
9
delete config . chromeExtensionBoilerplate ;
9
10
10
- webpack ( config , function ( err ) {
11
+ webpack ( config , function ( err ) {
11
12
if ( err ) throw err ;
12
13
} ) ;
Original file line number Diff line number Diff line change 1
1
// Do this as the first thing so that any code reading it knows the right env.
2
2
process . env . BABEL_ENV = 'development' ;
3
3
process . env . NODE_ENV = 'development' ;
4
+ process . env . ASSET_PATH = '/' ;
4
5
5
6
var WebpackDevServer = require ( 'webpack-dev-server' ) ,
6
7
webpack = require ( 'webpack' ) ,
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ var webpack = require('webpack'),
7
7
HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ,
8
8
TerserPlugin = require ( 'terser-webpack-plugin' ) ;
9
9
10
+ const ASSET_PATH = process . env . ASSET_PATH || '/' ;
11
+
10
12
// load the secrets
11
13
var alias = {
12
14
'react-dom' : '@hot-loader/react-dom' ,
@@ -45,6 +47,7 @@ var options = {
45
47
output : {
46
48
path : path . join ( __dirname , 'build' ) ,
47
49
filename : '[name].bundle.js' ,
50
+ publicPath : ASSET_PATH ,
48
51
} ,
49
52
module : {
50
53
rules : [
You can’t perform that action at this time.
0 commit comments