This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 808
No CSS sourcemaps #209
Comments
got the same issue, when trying to run a downloaded repl. This is the terminal output for
This is my rollup.config.js - only custom thing should be the import svelte from 'rollup-plugin-svelte';
import commonjs from '@rollup/plugin-commonjs';
import replace from '@rollup/plugin-replace';
import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import css from 'rollup-plugin-css-only';
const production = !process.env.ROLLUP_WATCH;
function serve() {
let server;
function toExit() {
if (server) server.kill(0);
}
return {
writeBundle() {
if (server) return;
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});
process.on('SIGTERM', toExit);
process.on('exit', toExit);
}
};
}
export default {
input: 'src/main.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/bundle.js'
},
plugins: [
replace({
// https://medium.com/dev-cafe/how-to-setup-env-variables-to-your-svelte-js-app-c1579430f032
process: JSON.stringify({
env: {
NODE_ENV: production ? 'prod' : 'debug',
},
}),
preventAssignment: true,
}),
svelte({
compilerOptions: {
// …
dev: !production,
cssOutputFilename: "bundle.css.map"
}
}),
// …
css({ output: 'bundle.css' }),
// …
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),
// …
!production && serve(),
// …
!production && livereload('public'),
// …
production && terser()
],
watch: {
clearScreen: false
}
}; Version: Output for
|
edit: I am a bit confused, because my setup also seems to ignore the
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
CSS sourcemaps used to be emitted fine but now they're not. No instructions on how to get them back.
The text was updated successfully, but these errors were encountered: