mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +00:00
build: using rollup-plugin-esbuild
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [['@vant/cli/preset.cjs', { loose: true }]],
|
||||
};
|
@@ -14,8 +14,11 @@
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf ./dist",
|
||||
"dev": "rollup --config rollup.config.js --watch",
|
||||
"build": "rollup --config rollup.config.js && tsc -p ./tsconfig.json --emitDeclarationOnly",
|
||||
"build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
|
||||
"build:bundle": "rollup --config rollup.config.js",
|
||||
"build": "pnpm clean && pnpm build:bundle && pnpm build:types",
|
||||
"release": "pnpm build && release-it",
|
||||
"prepare": "pnpm build"
|
||||
},
|
||||
@@ -25,11 +28,11 @@
|
||||
"@popperjs/core": "^2.9.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vant/cli": "workspace:*",
|
||||
"@rollup/plugin-babel": "^5.2.1",
|
||||
"@rollup/plugin-node-resolve": "^10.0.0",
|
||||
"release-it": "^14.2.2",
|
||||
"rollup": "^2.33.3"
|
||||
"typescript": "4.x",
|
||||
"rollup": "^2.33.3",
|
||||
"rollup-plugin-esbuild": "^4.6.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
"release-it": "^14.2.2"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import path from 'path';
|
||||
import babel from '@rollup/plugin-babel';
|
||||
import esbuild from 'rollup-plugin-esbuild';
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
|
||||
export default {
|
||||
@@ -14,8 +14,5 @@ export default {
|
||||
format: 'esm',
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
babel({ babelHelpers: 'bundled', extensions: ['.js', '.ts'] }),
|
||||
nodeResolve(),
|
||||
],
|
||||
plugins: [esbuild(), nodeResolve()],
|
||||
};
|
||||
|
@@ -2,13 +2,11 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2015",
|
||||
"outDir": "./dist",
|
||||
"module": "ES2015",
|
||||
"module": "ESNext",
|
||||
"strict": true,
|
||||
"declaration": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"moduleResolution": "node",
|
||||
"lib": ["esnext", "dom"]
|
||||
"moduleResolution": "Node",
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user