chore: generate sourcemap in dev (#1920)

pull/1930/head
CHOYSEN 2 years ago committed by GitHub
parent e3879be4a1
commit 35a17601d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,7 +51,7 @@
"scripts": { "scripts": {
"dev": "rimraf dist && run-s dev-shared dev-start", "dev": "rimraf dist && run-s dev-shared dev-start",
"dev-start": "run-p dev-client dev-node dev-watch", "dev-start": "run-p dev-client dev-node dev-watch",
"dev-client": "tsc -w -p src/client", "dev-client": "tsc --sourcemap -w -p src/client",
"dev-node": "DEV=true pnpm build-node -w", "dev-node": "DEV=true pnpm build-node -w",
"dev-shared": "node scripts/copyShared", "dev-shared": "node scripts/copyShared",
"dev-watch": "node scripts/watchAndCopy", "dev-watch": "node scripts/watchAndCopy",

@ -52,7 +52,8 @@ const esmBuild: RollupOptions = {
format: 'esm', format: 'esm',
entryFileNames: `[name].js`, entryFileNames: `[name].js`,
chunkFileNames: 'serve-[hash].js', chunkFileNames: 'serve-[hash].js',
dir: r('dist/node') dir: r('dist/node'),
sourcemap: DEV
}, },
external, external,
plugins, plugins,

Loading…
Cancel
Save