我是webpack的新手,在配置它以生成必要的源映射时遇到了一些麻烦.在devtools它说
检测到源地图
但它显示了捆绑而不是原始代码:

这是我的webpack.config.js:
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:8080/',
'webpack/hot/dev-server',
"./src/index.js"
],
output: {
filename: 'bundle.js',
path: '/',
},
debug: true,
devtool: 'source-map',
resolve: {
extensions: ['', '.jsx', '.scss', '.js', '.json']
},
module: {
loaders: [
{
test: /(\.js|\.jsx)$/,
exclude: /node_modules/,
loaders: ['react-hot','babel']
},
{
test: /\.scss$/,
exclude: /node_modules/,
loaders: ["style", "css?sourceMap", "sass?sourceMap"]
}
]
},
devServer: { hot: true },
plugins: [ new webpack.HotModuleReplacementPlugin() ],
inline: true,
progress: true,
colors: true
};
Run Code Online (Sandbox Code Playgroud)
这是我的package.json:
{
"name": "react-template",
"version": "1.0.0", …Run Code Online (Sandbox Code Playgroud) 我的用例是:
我正在尝试使用redux-observable在我的Redux应用程序中使用Observable .如果你能想到让上述用户流程工作的另一种方式,我很乐意听到.
NB.我正在使用rxjs V5
export const fetchAssetListEpic = (action$, store) => {
return action$.ofType('FETCH_ASSET_LIST')
.switchMap( action => {
const options = {
crossDomain: true,
withCredentials: true,
url: uriGenerator('assetList', action.payload)
};
return ajax(options);
})
.map(fetchAssetListSuccess)
.retryWhen(handleError)
.catch(redirectToSignIn);
};
function handleError(err) {
return (err.status === 401) ?
/* Authenticate here [Step 2] */
/* Send new JWT to API [Step 3] */
/* If successful make original request again [Step …Run Code Online (Sandbox Code Playgroud)