svelte-tailwind-extension-boilerplate
svelte-tailwind-extension-boilerplate copied to clipboard
Not working debugging via IDE (like vscode) for typescript based chrome extension
Not working debugging via IDE (like vscode) for typescript based chrome extension due to lack of source map within chrome extension.
If you're looking to add source maps to your output in your rollup.config.js change the typescript plugin to:
typescript({ sourceMap: true }),
And under the output section add:
sourcemap: true,
So it should look like:
export default {
input: "src/manifest.json",
output: {
dir: "dist",
format: "esm",
sourcemap: true,
},
plugins: [
// always put chromeExtension() before other plugins
chromeExtension(),
simpleReloader(),
svelte({
preprocess: sveltePreprocess(),
compilerOptions: {
// enable run-time checks when not in production
dev: !production,
},
}),
postcss({ minimize: production }),
// the plugins below are optional
resolve({
dedupe: ["svelte"],
}),
// https://github.com/rollup/plugins/tree/master/packages/commonjs
commonjs(),
typescript({ sourceMap: true }),
// Empties the output dir before a new build
emptyDir(),
// If we're building for production, minify
production && terser(),
// Outputs a zip file in ./releases
production && zip({ dir: "releases" }),
],
}
Let me know if this is what you were looking for