Skip to content

Commit

Permalink
fix: move @unocss/webpack to ESM First (#3708)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Apr 11, 2024
1 parent 0f4ad40 commit 25e97ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/webpack/build.config.ts
Expand Up @@ -6,6 +6,9 @@ export default defineBuildConfig({
],
clean: true,
declaration: true,
rollup: {
emitCJS: true,
},
externals: [
'vite',
'webpack',
Expand Down
12 changes: 9 additions & 3 deletions packages/webpack/package.json
Expand Up @@ -22,11 +22,17 @@
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
}
},
"main": "./dist/index.mjs",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
Expand Down

0 comments on commit 25e97ca

Please sign in to comment.