Skip to content

Commit

Permalink
Add Sourcemap to build:dev
Browse files Browse the repository at this point in the history
给 build:dev 的 webpack 打包加入 Sourcemap 有助于调试。
  • Loading branch information
Inaru committed Nov 12, 2019
1 parent 1b6f2a5 commit fa66ec6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ if (config.mode === 'production') {
]);
}

config.devtool = config.mode === 'production' ? 'none' : 'cheap-module-eval-source-map';

if (process.env.HMR === 'true') {
config.plugins = (config.plugins || []).concat([
new ChromeExtensionReloader(),
Expand Down

0 comments on commit fa66ec6

Please sign in to comment.