Skip to content

Commit

Permalink
fix: add source map
Browse files Browse the repository at this point in the history
  • Loading branch information
safiranugroho committed Oct 22, 2023
1 parent 6370888 commit 3b2f25f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@
},
"files": [
"package/web-components.min.js",
"package/web-components.min.js.map",
"package/web-components-fonts.css",
"package/web-components-metadata.min.js"
"package/web-components-metadata.min.js",
"package/web-components-metadata.min.js.map"

],
"dependencies": {
"@sveltejs/adapter-vercel": "^3.0.3",
Expand Down
14 changes: 9 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default [{
// The file that creates all web components.
input: 'src/web-components.ts',
output: {
sourcemap: !production,
sourcemap: true,
format: 'iife',
name: 'app',
// Output it to public. This way, the SvelteKit
Expand All @@ -29,10 +29,12 @@ export default [{
},
watch: !production,
plugins: [
typescript(),
typescript({
sourceMap: true,
}),
svelte({
preprocess: sveltePreprocess({
sourceMap: !production,
sourceMap: true,
postcss: {
plugins: [cssImport({ plugins: [cssImportUrl()] }), cssImportUrl(), cssVariables(), cssRemoveRoot(), cssAutoprefixer()]
}
Expand Down Expand Up @@ -62,14 +64,16 @@ export default [{
{
input: 'src/web-components-metadata.ts',
output: {
sourcemap: !production,
sourcemap: true,
format: 'es',
name: 'app',
file: 'package/web-components-metadata.min.js',
},
watch: !production,
plugins: [
typescript(),
typescript({
sourceMap: true,
}),
resolve(),
commonjs(),
production && terser(),
Expand Down

0 comments on commit 3b2f25f

Please sign in to comment.