Skip to content

Commit 245bef5

Browse files
authored
fix: Sourcemap issues in production build (#312)
1 parent 944ee93 commit 245bef5

File tree

10 files changed

+18839
-24493
lines changed

10 files changed

+18839
-24493
lines changed

.changeset/yellow-meals-camp.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@powersync/kysely-driver': patch
3+
'@powersync/react-native': patch
4+
'@powersync/attachments': patch
5+
'@powersync/common': patch
6+
'@powersync/react': patch
7+
'@powersync/vue': patch
8+
'@powersync/web': patch
9+
---
10+
11+
Ensuring sourcemaps are not included for packages.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"main": "index.js",
77
"scripts": {
88
"build:packages": "pnpm run --filter './packages/**' -r build",
9+
"build:packages:prod": "pnpm run --filter './packages/**' -r build:prod",
910
"clean:packages": "pnpm run --filter './packages/**' -r clean",
10-
"build:packages:prod": "pnpm build:packages --sourceMap false",
1111
"watch:packages": "pnpm run --parallel --filter './packages/**' -r build -w",
1212
"changeset:version": "pnpm changeset version && pnpm install --lockfile-only --frozen-lockfile=false",
1313
"build": "pnpm run -r build",

packages/attachments/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
],
2424
"scripts": {
2525
"build": "tsc -b",
26+
"build:prod": "tsc -b --sourceMap false",
2627
"clean": "rm -rf lib tsconfig.tsbuildinfo",
2728
"watch": "tsc -b -w"
2829
},

packages/common/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"homepage": "https://docs.powersync.com",
3434
"scripts": {
3535
"build": "tsc -b && rollup -c rollup.config.mjs",
36+
"build:prod": "tsc -b --sourceMap false && rollup -c rollup.config.mjs --sourceMap false",
3637
"clean": "rm -rf lib dist tsconfig.tsbuildinfo",
3738
"test": "vitest"
3839
},

packages/kysely-driver/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"homepage": "https://docs.powersync.com",
2121
"scripts": {
2222
"build": "tsc --build",
23+
"build:prod": "tsc --build --sourceMap false",
2324
"clean": "rm -rf lib tsconfig.tsbuildinfo",
2425
"watch": "tsc --build -w",
2526
"test": "pnpm build && vitest"

packages/react-native/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
],
1515
"scripts": {
1616
"build": "tsc -b && rollup -c rollup.config.mjs",
17-
"clean": "rm -rf lib tsconfig.tsbuildinfo dist",
17+
"build:prod": "tsc -b --sourceMap false && rollup -c rollup.config.mjs --sourceMap false",
18+
"clean": "rm -rf lib dist tsconfig.tsbuildinfo dist",
1819
"watch": "tsc -b -w"
1920
},
2021
"repository": {

packages/react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
],
1414
"scripts": {
1515
"build": "tsc -b",
16+
"build:prod": "tsc -b --sourceMap false",
1617
"clean": "rm -rf lib tsconfig.tsbuildinfo",
1718
"test": "vitest",
1819
"watch": "tsc -b -w"

packages/vue/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
],
1414
"scripts": {
1515
"build": "tsc -b",
16+
"build:prod": "tsc -b --sourceMap false",
1617
"clean": "rm -rf lib tsconfig.tsbuildinfo",
1718
"watch": "tsc -b -w",
1819
"test": "vitest"

packages/web/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@
4040
"build:tsc": "tsc --build",
4141
"build:webpack-main": "webpack",
4242
"build:webpack-workers": "webpack --config webpack.workers.config.js",
43-
"build": "npm run build:tsc -- \"$@\" && npm run build:webpack-main && npm run build:webpack-workers",
44-
"clean": "rm -rf lib tsconfig.tsbuildinfo",
43+
"build": "pnpm run build:tsc && pnpm run build:webpack-main && pnpm run build:webpack-workers",
44+
"build:prod": "pnpm run build:tsc --sourceMap false && pnpm run build:webpack-main && pnpm run build:webpack-workers",
45+
"clean": "rm -rf lib dist tsconfig.tsbuildinfo",
4546
"watch": "tsc --build -w",
4647
"test": "pnpm build && vitest"
4748
},

pnpm-lock.yaml

Lines changed: 18817 additions & 24489 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)