Skip to content

Commit f0fc140

Browse files
committed
Switch to a development bundler build
1 parent 49efbe1 commit f0fc140

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

packages/create-vue-lib/src/template/base/config/packages/@projectName@/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@
1414
},
1515
"sideEffects": false,
1616
"main": "dist/@[email protected]",
17-
"module": "dist/@[email protected]",
17+
"module": "dist/@[email protected].prod.mjs",
1818
"unpkg": "dist/@[email protected]",
1919
"jsdelivr": "dist/@[email protected]",
2020
"types": "dist/@[email protected]",
2121
"exports": {
2222
".": {
2323
"types": "./dist/@[email protected]",
24-
"import": "./dist/@[email protected]",
24+
"import": {
25+
"development": "./dist/@[email protected]",
26+
"default": "./dist/@[email protected]"
27+
},
2528
"require": "./dist/@[email protected]"
2629
},
2730
"./dist/*": "./dist/*",

packages/create-vue-lib/src/template/base/config/packages/@projectName@/vite.config.mts.ejs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,14 @@ export default defineConfig(({ mode }): UserConfig => {
6868
name += '.global'
6969
}
7070
else if (format === 'es') {
71-
name += '.esm-' + (mode === 'neutral' ? 'bundler' : 'browser')
71+
name += '.esm'
72+
73+
if (mode === 'neutral') {
74+
name += '-bundler.prod'
75+
}
76+
else if (mode === 'production') {
77+
name += '-browser'
78+
}
7279
}
7380
7481
if (mode === 'production') {

0 commit comments

Comments
 (0)