Skip to content

Commit d47bbd8

Browse files
[fix] Fix json import in slim build (#1036)
1 parent 1aa91eb commit d47bbd8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

support/webpack.config.slim.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ module.exports = {
1010
filename: 'socket.io.slim.js'
1111
},
1212
externals: {
13-
global: glob()
13+
global: glob(),
14+
json3: 'JSON'
1415
},
1516
devtool: 'cheap-module-source-map',
1617
plugins: [
17-
new webpack.NormalModuleReplacementPlugin(/(debug|json3)/, process.cwd() + '/support/noop.js')
18+
new webpack.NormalModuleReplacementPlugin(/debug/, process.cwd() + '/support/noop.js')
1819
],
1920
module: {
2021
loaders: [{

0 commit comments

Comments
 (0)