Webpack + Vue Storefront: dist .js file contains multiple "\n//\n"

61 views Asked by At

I'm working on a Vue Storefront (link to Github repo) project and looking at a filed build by Webpack I see that is full of

\n//\n//\n//\n//\n//\n//\n/* harmony default export */

sometimes this string is even longer, like:

\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */

this is at the end of a file path and it looks something like this:

webpack_require(123);\n\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./mypath/MyFile.vue?vue&type=script&lang=js&\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n/* harmony default export */

Since the project is quite big and the bundled files are huge, I was wondering what those "\n//\n" stand for and in case if there's a way to get rid of them, or reduce them in order to save some kb on the final generated file.

The webpack files are the default ones: Github link

Thanks.

0

There are 0 answers