Closed nodefish closed 7 years ago
Rollup doesn't generate source maps by default, so there is nothing to do (just call the nodent plugin without options).
If you want to generate source maps, you can do it by specifying the sourceMap: true
option at the root level (as it is a global option that applies to all the plugins you use).
I've updated the readme file to show how to do it.
Thanks for responding.
I've already got sourceMap: false
for rollup, and I'm usingnodent()
without settings, and it works fine on the first build, but any subsequent builds triggered by saving a file (-w rollup flag) still seem to include inline sourcemaps (//# sourceMappingURL=data:application/json;charset=utf-8;base64,...
) which bloat the output file size. Removing nodent()
is the only thing that resolves the issue for me, or just running rollup -c
each time rather than using watch mode.
Do you have a reproducible project that I can try out ? I've tried to reproduce your problem but it works, so I'm wondering what is different ?
I'll make one ASAP and get back to you. Thanks.
Managed to reproduce it: https://github.com/nodefish/rollup-plugin-nodent-issue-2
If you run rollup -c
, the output will not include sourcemaps (correct behavior).
If you run rollup -c -w
, the first output is correct, but then if you modify any files (say, src/index.js
), a rebuild will be triggered: note that inline sourcemaps are included this time.
There was indeed a bug in the code. I've fixed it and released a new version 0.1.1. Can you try again with this version and tell me if this solves the problem ?
Can confirm it works now, thanks!
Using a generic rollup config, with
nodent({ sourceMap: false })
as one of the plugins, and runningrollup -c -w
(watch mode) causes the issue. The first build respects the setting, but any builds after the first generate inline sourceMaps.