FlandreDaisuki / rollup-plugin-userscript-metablock

Transform json file to userscript metablock and append on.
https://www.npmjs.com/package/rollup-plugin-userscript-metablock
MIT License
35 stars 8 forks source link

Respect rollup output configuration instead of a plugin option #16

Closed cvzi closed 3 years ago

cvzi commented 3 years ago

To disable the sourcemap generation if someone doesn't need it, I had used option.sourcemap i.e. a new option for this plugin.

Now I realized the output file configuration from rollup configuration can be used, no need to have a plugin option

{
  input: 'in.js',
  output: {
    file: 'out.js',
    format: 'esm',
    sourcemap: true
  }
}

It is in outputOptions.sourcemap in renderChunk(code, renderedChunk, outputOptions)