feat: using mjs extension for esmodule (#10625)

This commit is contained in:
neverland 2022-05-22 20:10:14 +08:00 committed by chenjiahan
parent ba448b8617
commit 607e6e2be4
2 changed files with 4 additions and 17 deletions

View File

@ -3,27 +3,11 @@
"version": "3.4.9",
"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"
},
"files": [
"es",
"lib",

View File

@ -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/',