Open morenoh149 opened 8 years ago
I always seem to get Unable to load source map: ... when I use the hot-loader. Any idea what might be causing this? I see source-map type sourcemap is used here https://github.com/adampash/react-native-hot-redux-starter/blob/master/webpack.config.js#L9 and in the server logs the file is requested but not available
Unable to load source map: ...
source-map
Launching Dev Tools... transforming [========================================] 100% 310/310 Launching Dev Tools... [10:00:33 PM] <START> request:/index.ios.bundle [10:00:33 PM] <END> request:/index.ios.bundle (9ms) [10:00:33 PM] <START> request:/index.ios.bundle [10:00:33 PM] <END> request:/index.ios.bundle (8ms) Cannot GET /index.ios.js.map [10:00:36 PM] <START> request:/index.ios.bundle [10:00:36 PM] <END> request:/index.ios.bundle (11ms)
The babel-loader says the option is ignored and to use the devtool option in webpack https://github.com/babel/babel-loader
devtool
I think it's because the map is stored to path.resolve(__dirname, 'build') but under hot-loading the browser queries config.output.publicPath = 'http://localhost:8082/'
path.resolve(__dirname, 'build')
config.output.publicPath = 'http://localhost:8082/'
looks like a limitation of the underlying dependency https://github.com/mjohnston/react-native-webpack-server/issues/27
I always seem to get
Unable to load source map: ...
when I use the hot-loader. Any idea what might be causing this? I seesource-map
type sourcemap is used here https://github.com/adampash/react-native-hot-redux-starter/blob/master/webpack.config.js#L9 and in the server logs the file is requested but not availableThe babel-loader says the option is ignored and to use the
devtool
option in webpack https://github.com/babel/babel-loaderI think it's because the map is stored to
path.resolve(__dirname, 'build')
but under hot-loading the browser queriesconfig.output.publicPath = 'http://localhost:8082/'