webpack - remove “webpackBootstrap” code

前端 未结 3 1453
-上瘾入骨i
-上瘾入骨i 2020-12-06 10:08

I am using WebPack to concat js files and output to a dist folder. All this seems to work, however my problem is that I want to concat all the js files without extra webpac

3条回答
  •  青春惊慌失措
    2020-12-06 10:20

    Assuming you are using Webpack 4, drop the runtimeChunk to the config file so Webpack will generate a runtime .js file which contains only the webpackBootstrap part, leaving your output file clean:

    optimization: {
        runtimeChunk: true,
    }
    

提交回复
热议问题