Webpack 5: devtool ValidationError, invalid configuration object

前端 未结 1 527
隐瞒了意图╮
隐瞒了意图╮ 2021-01-18 20:11

While migrating from Webpack 4 to Webpack 5 I got an error when using devtool with empty value (only in production mode).

module.exports = {
             


        
相关标签:
1条回答
  • 2021-01-18 20:24

    Answer to own question! Spoiler: false.

    module.exports = {
        devtool: isProd ? false : 'source-map',
    }
    

    In Webpack 4 it was possible to value this with an empty string. webpack 5 is more strict. Webpacks devtool configuration.

    0 讨论(0)
提交回复
热议问题