diff --git a/packages/vant/package.json b/packages/vant/package.json index 9d7e1e654..87140fd0c 100644 --- a/packages/vant/package.json +++ b/packages/vant/package.json @@ -3,27 +3,11 @@ "version": "4.0.0-alpha.3", "description": "Mobile UI Components built on Vue", "main": "lib/vant.cjs.js", - "module": "es/index.js", + "module": "es/index.mjs", "style": "lib/index.css", "typings": "lib/index.d.ts", "unpkg": "lib/vant.min.js", "jsdelivr": "lib/vant.min.js", - "exports": { - ".": { - "node": { - "import": "./lib/ssr.mjs", - "require": "./lib/ssr.js" - }, - "import": "./es/index.js", - "require": "./lib/vant.cjs.js", - "types": "./lib/index.d.ts" - }, - "./es": "./es/index.js", - "./lib": "./lib/vant.cjs.js", - "./es/": "./es/", - "./lib/": "./lib/", - "./package.json": "./package.json" - }, "npm": { "tag": "next" }, diff --git a/packages/vant/vant.config.mjs b/packages/vant/vant.config.mjs index eef201a1d..61f5465bc 100644 --- a/packages/vant/vant.config.mjs +++ b/packages/vant/vant.config.mjs @@ -5,6 +5,9 @@ export default { namedExport: true, skipInstall: ['lazyload'], packageManager: 'pnpm', + extensions: { + esm: '.mjs' + }, site: { publicPath: (typeof window === 'undefined' && process.env.PUBLIC_PATH) || '/vant/v4',