adampash / react-native-hot-redux-starter

137 stars 8 forks source link

Sourcemap not loaded #3

Open morenoh149 opened 8 years ago

morenoh149 commented 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

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

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/'

morenoh149 commented 8 years ago

looks like a limitation of the underlying dependency https://github.com/mjohnston/react-native-webpack-server/issues/27