maxdavidson / rollup-plugin-sourcemaps

Rollup plugin for loading files with existing source maps
MIT License
65 stars 18 forks source link

How to use with commandline rollup? #122

Open ygoe opened 2 years ago

ygoe commented 2 years ago

I'm using rollup on the commandline, it's executed from another tool program (not written in JavaScript). How can I enable this plugin in this scenario? The only documentation I could find is the very short readme file, and I don't understand what it says about the usage. What's that code? Where should I put it?

Here's basically what I do:

npm install -g rollup
C:\Users\...\rollup ui-singlefile.js -o build\ui-singlefile.bundle.js -m

What do I need to change in this command line to use the plugin?

ygoe commented 2 years ago

Looks like that anonymous code blob in the readme is a config file for rollup. Never seen or used them. And they don't fit in my workflow either. This is how I managed to get it working without such files:

npm install -g rollup
npm install -g rollup-plugin-sourcemaps
rollup ui-singlefile.js -o build\ui-singlefile.bundle.js -m -p rollup-plugin-sourcemaps

Would be nice to have a bit more explanation in the description.