Skip to content

Commit

Permalink
feat: switch to esm-first package
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Dec 27, 2024
1 parent 944ffc4 commit e4feb3e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
File renamed without changes.
31 changes: 18 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.2.3",
"packageManager": "[email protected]",
"description": "Transform file to a default-export string.",
"type": "module",
"keywords": [
"unplugin",
"rollup",
Expand All @@ -24,32 +25,36 @@
"dist"
],
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"require": "./dist/index.cjs",
"import": "./dist/index.js"
},
"./vite": {
"require": "./dist/vite.js",
"import": "./dist/vite.mjs"
"require": "./dist/vite.cjs",
"import": "./dist/vite.js"
},
"./webpack": {
"require": "./dist/webpack.js",
"import": "./dist/webpack.mjs"
"require": "./dist/webpack.cjs",
"import": "./dist/webpack.js"
},
"./rspack": {
"require": "./dist/rspack.cjs",
"import": "./dist/rspack.js"
},
"./rollup": {
"require": "./dist/rollup.js",
"import": "./dist/rollup.mjs"
"require": "./dist/rollup.cjs",
"import": "./dist/rollup.js"
},
"./rolldown": {
"require": "./dist/rolldown.js",
"import": "./dist/rolldown.mjs"
"require": "./dist/rolldown.cjs",
"import": "./dist/rolldown.js"
},
"./esbuild": {
"require": "./dist/esbuild.js",
"import": "./dist/esbuild.mjs"
"require": "./dist/esbuild.cjs",
"import": "./dist/esbuild.js"
},
"./*": [
"./*",
Expand Down
3 changes: 3 additions & 0 deletions src/rspack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import unplugin from '.'

export default unplugin.rspack as typeof unplugin.rspack

0 comments on commit e4feb3e

Please sign in to comment.