You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
I am building an ES6 module library with multiple Vue components using rollup and rollup-plugin-terser. Unfortunately, the generated .map file is missing at least one source file. This appears similar to #72 .
Why do I think this is an issue of rollup-plugin-terser?
If I run rollup without terser then the .map file is complete (and the .js is not compressed). Running terser from the command line on these files creates the expected result: a compressed .js file and a complete .map file.
How to reproduce
I have prepared a minimal project demonstrating this issue. Download, unzip and run npm install.
Uncomment terser() in rollup.config.js and npm run build. This builds a library of two simple Vue components (<comp-main> and <comp-aux>) in dist/components.esm.js. Only comp-aux.vue shows up in the sourcemap sources property.
Building a correct sourcemap: remove terser() from rollup.config.js, npm run build and then npm run terser. Now the sourcemap sources property contains both comp-main.vue and comp-aux.vue.
Workaround
Remove terser() from rollup.config.js and run terser automatically after building. This is done by just removing the leading '_' from "_postbuild" in package.json.
The text was updated successfully, but these errors were encountered:
undecaf
added a commit
to undecaf/vue-material-vuelidate
that referenced
this issue
Aug 29, 2020
Description
I am building an ES6 module library with multiple Vue components using rollup and rollup-plugin-terser. Unfortunately, the generated
.map
file is missing at least one source file. This appears similar to #72 .Why do I think this is an issue of rollup-plugin-terser?
If I run rollup without terser then the
.map
file is complete (and the.js
is not compressed). Running terser from the command line on these files creates the expected result: a compressed.js
file and a complete.map
file.How to reproduce
I have prepared a minimal project demonstrating this issue. Download, unzip and run
npm install
.Uncomment
terser()
inrollup.config.js
andnpm run build
. This builds a library of two simple Vue components (<comp-main>
and<comp-aux>
) indist/components.esm.js
. Onlycomp-aux.vue
shows up in the sourcemapsources
property.Building a correct sourcemap: remove
terser()
fromrollup.config.js
,npm run build
and thennpm run terser
. Now the sourcemapsources
property contains bothcomp-main.vue
andcomp-aux.vue
.Workaround
Remove
terser()
fromrollup.config.js
and run terser automatically after building. This is done by just removing the leading'_'
from"_postbuild"
inpackage.json
.The text was updated successfully, but these errors were encountered: