mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
feat(Poppperjs): add esm output
This commit is contained in:
parent
1304c6f36b
commit
5f436fc62f
@ -2,8 +2,12 @@
|
|||||||
"name": "@vant/popperjs",
|
"name": "@vant/popperjs",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Precompiled popperjs core",
|
"description": "Precompiled popperjs core",
|
||||||
"main": "lib/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
|
"module": "dist/esm/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
"registry": "https://registry.npmjs.org/"
|
"registry": "https://registry.npmjs.org/"
|
||||||
|
@ -4,9 +4,15 @@ import nodeResolve from '@rollup/plugin-node-resolve';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: path.join(__dirname, 'src', 'index.ts'),
|
input: path.join(__dirname, 'src', 'index.ts'),
|
||||||
output: {
|
output: [
|
||||||
dir: 'lib',
|
{
|
||||||
format: 'cjs',
|
dir: 'dist/cjs',
|
||||||
},
|
format: 'cjs',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dir: 'dist/esm',
|
||||||
|
format: 'esm',
|
||||||
|
},
|
||||||
|
],
|
||||||
plugins: [nodeResolve(), babel({ babelHelpers: 'runtime' })],
|
plugins: [nodeResolve(), babel({ babelHelpers: 'runtime' })],
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"outDir": "./lib",
|
"outDir": "./dist",
|
||||||
"module": "ES2015",
|
"module": "ES2015",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user