Skip to content

Commit 5b1eae2

Browse files
committed
fix(build): remove dev tools bundling for production builds
1 parent 947b1d0 commit 5b1eae2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rollup.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ function createConfig(buildName, output, plugins = []) {
9292
const isGlobalBuild = buildName === 'global'
9393
const isRawESMBuild = buildName === 'browser'
9494
const isNodeBuild = buildName === 'cjs'
95-
const isBundlerESMBuild = buildName === 'browser' || buildName === 'mjs'
95+
const isBundlerESMBuild =
96+
!isProductionBuild && (buildName === 'browser' || buildName === 'mjs')
9697

9798
if (isGlobalBuild) output.name = pascalcase(pkg.name)
9899

@@ -205,7 +206,7 @@ function createProductionConfig(buildName, output) {
205206
return createConfig(
206207
buildName,
207208
{
208-
file: resolve(parsedPath.dir, `${parsedPath.name}.prod${parsedPath.ext}`),
209+
file: `${parsedPath.dir}/${parsedPath.name}.prod${parsedPath.ext}`,
209210
format: output.format,
210211
},
211212
[

0 commit comments

Comments
 (0)