diff --git a/packages/fes-builder-webpack/src/plugins/commands/webpackConfig/index.js b/packages/fes-builder-webpack/src/plugins/commands/webpackConfig/index.js index d834354e8..429a8009b 100644 --- a/packages/fes-builder-webpack/src/plugins/commands/webpackConfig/index.js +++ b/packages/fes-builder-webpack/src/plugins/commands/webpackConfig/index.js @@ -60,7 +60,7 @@ export default async function getConfig({ api, cwd, config, env, entry = {}, mod webpackConfig.mode(env); webpackConfig.stats('errors-only'); webpackConfig.externals(config.externals || {}); - webpackConfig.devtool(false); + webpackConfig.devtool(isDev ? config.devtool || 'cheap-module-source-map' : config.devtool); // --------------- cache ----------- webpackConfig.cache({