I'm using vue-cli 2.9.6
, and created a vue project using vue init webpack <project name>
.
When I call vue run build
, it is creating a number of different js files (and names change each time...):
vendor.20d54e752692d648b42a.js
vendor.20d54e752692d648b42a.js.map
app.ed70f310595763347909.js
app.ed70f310595763347909.js.map
manifest.2ae2e69a05c33dfc65f8.js
manifest.2ae2e69a05c33dfc65f8.js.map
And also css files like this:
app.a670fcd1e9a699133143a2b144475068.css
app.a670fcd1e9a699133143a2b144475068.css.map
I would like the output to simply be 2 files:
build.js { for all js }
styles.css { for all css }
How can I achieve this?
webpack.prod.conf.js
To prevent sourceMaps set in
config/index.js
the variableproductionSourceMap
fromtrue
tofalse
Changing name of app.js to build.js can be obtained modifying the
entry
andoutput
properties in webpack.base.conf.js this way:ExtractTextPlugin
in webpack.prod.conf.js tofilename: utils.assetsPath('css/styles.css'),