Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 7d34a33

Browse files
author
soliury
authored
Merge pull request #82 from flyskywhy/master
react-web: Fix "ERROR in Path must be a string"
2 parents 7a8252a + 5f309f8 commit 7d34a33

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

web/webpack.config.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ module.exports = {
3030
},
3131
extensions: ['', '.js', '.web.js', '.ios.js', '.android.js', '.jsx'],
3232
},
33-
entry: isProd? [
33+
entry: isProd ? [
3434
'babel-polyfill',
3535
config.paths.index
36-
]: [
36+
] : [
3737
'babel-polyfill',
3838
'webpack-dev-server/client?http://' + IP + ':' + PORT,
3939
'webpack/hot/only-dev-server',
4040
config.paths.index,
4141
],
4242
output: {
43+
publicPath: '',
4344
path: path.join(__dirname, 'output'),
4445
filename: 'bundle.js'
4546
},
@@ -50,13 +51,13 @@ module.exports = {
5051
}),
5152
new webpack.DefinePlugin({
5253
'process.env': {
53-
'NODE_ENV': JSON.stringify(isProd? PROD: DEV),
54+
'NODE_ENV': JSON.stringify(isProd ? PROD : DEV),
5455
},
5556
'__DEV__': !isProd
5657
}),
57-
isProd? new webpack.ProvidePlugin({
58-
React: "react"
59-
}): new webpack.HotModuleReplacementPlugin(),
58+
isProd ? new webpack.ProvidePlugin({
59+
React: 'react'
60+
}) : new webpack.HotModuleReplacementPlugin(),
6061
new webpack.NoErrorsPlugin(),
6162
new HtmlPlugin(),
6263
],

0 commit comments

Comments
 (0)