Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webpack - remove "webpackBootstrap" code

Tags:

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 webpack boostrap code

/******/ (function(modules) { // (/******/ (function(modules) { // webpackBootstrap)...... 

Is there anyway to prevent webpack from adding that code rather just take the plain js files and concat them (like gulp-concat).

like image 347
user7886649 Avatar asked Apr 19 '17 01:04

user7886649


1 Answers

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, } 
like image 139
Ton Nguyen Avatar answered Nov 08 '22 05:11

Ton Nguyen