"benchmark": "pnpm build && node --max-old-space-size=4096 --enable-source-maps benchmarks/internal/bench.mjs",
"benchmark:prod": "pnpm build:prod && node --max-old-space-size=4096 --enable-source-maps benchmarks/internal/bench.mjs",
"benchmark:debug": "pnpm build && node --max-old-space-size=4096 --enable-source-maps --inspect benchmarks/internal/bench.mjs",
- "test": "pnpm build --environment SOURCEMAP:false && c8 mocha 'tests/**/*.test.mjs'",
+ "test": "pnpm build && c8 mocha 'tests/**/*.test.mjs'",
"test:debug": "pnpm build && mocha --no-parallel --inspect 'tests/**/*.test.mjs'",
"coverage": "c8 report --reporter=lcov",
"coverage:html": "c8 report --reporter=html",
const isDevelopmentBuild = env.BUILD === 'development'
const isAnalyzeBuild = env.ANALYZE
const isDocumentationBuild = env.DOCUMENTATION
-const sourcemap = env.SOURCEMAP !== 'false'
const maxWorkers = Math.floor(availableParallelism() / 2)
output: [
{
format: 'cjs',
+ sourcemap: true,
...(isDevelopmentBuild && {
dir: './lib',
preserveModules: true,
...(!isDevelopmentBuild && {
file: './lib/index.js',
plugins: [terser({ maxWorkers })]
- }),
- ...(sourcemap && {
- sourcemap
})
},
{
format: 'esm',
+ sourcemap: true,
...(isDevelopmentBuild && {
dir: './lib',
entryFileNames: '[name].mjs',
...(!isDevelopmentBuild && {
file: './lib/index.mjs',
plugins: [terser({ maxWorkers })]
- }),
- ...(sourcemap && {
- sourcemap
})
}
],
typescript({
tsconfig: './tsconfig.build.json',
compilerOptions: {
- sourceMap: sourcemap
+ sourceMap: true
}
}),
del({