KonnorRogers / snowpack-plugin-rollup-bundle

A plugin for Snowpack to bundle for production.
MIT License
48 stars 6 forks source link

Input sourcemaps should be loaded #27

Closed angryziber closed 3 years ago

angryziber commented 3 years ago

Please consider using this by default: https://www.npmjs.com/package/rollup-plugin-sourcemaps

Current sourcemaps relate to input files, but they themselves were generated from other source files (TypeScript/Svelte/etc), which are not visible in final source map.

angryziber commented 3 years ago

Currently, it is already possible to load input sourcemaps like this:

    ['snowpack-plugin-rollup-bundle', {
      ...
      extendConfig: config => {
        config.inputOptions.plugins.push(require('rollup-plugin-sourcemaps')())
        return config
      }
    }]

but it should be the default if snowpack sourcemaps are enabled

KonnorRogers commented 3 years ago

Absolutely! Ill be honest, sourcemaps have been a gray spot I hadnt even thought to look at. Id be more than happy to integrate this into a v0.3.4 for you! Also thank you for providing the work around.