aMarCruz / rollup-plugin-pug

Rollup plugin that transforms pug templates in es6 modules.
MIT License
27 stars 11 forks source link

Broken sourcemap #10

Closed nickngqs closed 7 years ago

nickngqs commented 7 years ago

My error message was Plugins that transform code (such as 'rollup-plugin-pug') should generate accompanying sourcemaps

In my main.js

import html from '../pug/template.pug';

In my rollup.config.js

import pug from 'rollup-plugin-pug';

export default {
    input: 'src/js/main.js',
    output: {
        file: 'dist/js/main.js',
        format: 'iife',
        sourcemap: 'inline',
    },
    plugins: [
        pug({
            include: 'src/pug/**.pug',
            pretty: true,
            staticPattern: /\S/,
            sourceMap: true
        })
    ]
}