使用babel和webpack时如何生成源地图?
我是webpack的新手,我需要进行设置以生成Sourcemap。我正在webpack serve从命令行运行,该命令行已成功编译。但是我真的需要sourcemap。这是我的webpack.config.js。 var webpack = require('webpack'); module.exports = { output: { filename: 'main.js', publicPath: '/assets/' }, cache: true, debug: true, devtool: true, entry: [ 'webpack/hot/only-dev-server', './src/components/main.js' ], stats: { colors: true, reasons: true }, resolve: { extensions: ['', '.js', '.jsx'], alias: { 'styles': __dirname + '/src/styles', 'mixins': __dirname + '/src/mixins', …