我有一个使用webpack + babel loader的ES6项目。
当我打开开发者工具时,我可以看到'webpack://'和所有我的源代码(ES6)。
问题是:断点不起作用,函数引用将我重定向到一个名为“?d41d”的文件。
该文件包含以下内容:
undefined
/** WEBPACK FOOTER **
**
**/
如果我从文档脚本钻到我的捆绑包中的函数,我也会到达?d41d文件。
我的webpack.config.js:
module.exports = {
debug: true,
devtool: 'cheap-module-eval-source-map',
entry: "entry.js",
output: {
path: "C:/html5/",
filename: "bundle.js"
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015'],
plugins: ['transform-object-assign'],
sourceMaps: ['inline']
}
}
]
}
};
并附上 package.json 的部分内容,以便帮助理解:
"devDependencies": {
"ava": "^0.16.0",
"babel-core": "^6.14.0",
"babel-loader": "^6.2.5",
"babel-plugin-transform-object-assign": "^6.8.0",
"babel-preset-es2015": "^6.13.2",
"cheerio": "^0.22.0",
"chokidar-cli": "^1.2.0",
"eslint": "^3.3.1",
"html-to-js": "0.0.1",
"jsdoc": "^3.4.0",
"jsdom": "^9.4.2",
"minami": "^1.1.1",
"obfuscator": "^0.5.4",
"sinon": "^1.17.5",
"uglify-js": "^2.7.3",
"webpack": "^1.13.2",
"yargs": "^5.0.0"
},
"dependencies": {
"jquery": "^3.1.0"
}
提前致谢。