Skip to content

Commit

Permalink
fix: Fix missing source contents in sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Mar 20, 2023
1 parent 7ed7495 commit 56d9708
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 28 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-spoons-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'wonka': patch
---

Fix missing source contents in Wonka sourcemaps.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"@rollup/plugin-buble": "^1.0.1",
"@rollup/plugin-commonjs": "^23.0.3",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-sucrase": "^5.0.1",
"@rollup/plugin-terser": "^0.1.0",
"@rollup/plugin-typescript": "^10.0.1",
"@rollup/pluginutils": "^5.0.2",
"@types/zen-observable": "^0.8.3",
"@typescript-eslint/eslint-plugin": "^5.45.0",
Expand Down
96 changes: 79 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 5 additions & 10 deletions scripts/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import sucrase from '@rollup/plugin-sucrase';
import buble from '@rollup/plugin-buble';
import terser from '@rollup/plugin-terser';
import cjsCheck from 'rollup-plugin-cjs-check';
Expand All @@ -22,15 +22,9 @@ const commonPlugins = [
extensions: ['.mjs', '.js', '.ts'],
}),

typescript({
exclude: ['src/**/*.test.ts', '**/__tests__/*'],
compilerOptions: {
sourceMap: true,
sourceRoot: './',
noEmit: false,
declaration: false,
target: 'esnext',
},
sucrase({
exclude: ['node_modules/**'],
transforms: ['typescript']
}),
];

Expand Down Expand Up @@ -102,6 +96,7 @@ const output = format => {
dir: './dist',
exports: 'named',
sourcemap: true,
sourcemapExcludeSources: false,
indent: false,
freeze: false,
strict: false,
Expand Down

0 comments on commit 56d9708

Please sign in to comment.