Commit 134d4564 by xuzhenzhao

chore(custom): rollup config

parent c2f23630
{ {
"mode": "exit", "mode": "pre",
"tag": "next", "tag": "next",
"initialVersions": { "initialVersions": {
"@ydl-packages/toolkit": "1.0.1-next.7" "@ydl-packages/toolkit": "1.0.1-next.8"
}, },
"changesets": [ "changesets": [
"angry-carrots-rest", "angry-carrots-rest",
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
[ [
"@babel/preset-env", "@babel/preset-env",
{ {
"useBuiltIns": "entry", "useBuiltIns": false,
"corejs": "3.22",
"targets": { "targets": {
"chrome": "58", "chrome": "58",
"ie": "11" "ie": "11"
......
...@@ -31,11 +31,9 @@ ...@@ -31,11 +31,9 @@
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
"consola": "^2.15.3",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"mathjs": "^11.0.1", "mathjs": "^11.0.1",
"qs": "^6.11.0", "qs": "^6.11.0"
"regenerator-runtime": "^0.13.9"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.10", "@babel/core": "^7.18.10",
......
...@@ -2,7 +2,7 @@ import typescript from 'rollup-plugin-typescript2' ...@@ -2,7 +2,7 @@ import typescript from 'rollup-plugin-typescript2'
import json from '@rollup/plugin-json'; import json from '@rollup/plugin-json';
import commonjs from '@rollup/plugin-commonjs'; import commonjs from '@rollup/plugin-commonjs';
import {nodeResolve} from '@rollup/plugin-node-resolve'; import {nodeResolve} from '@rollup/plugin-node-resolve';
import { babel } from '@rollup/plugin-babel'; import {babel} from '@rollup/plugin-babel';
export default [ export default [
{ {
...@@ -13,7 +13,8 @@ export default [ ...@@ -13,7 +13,8 @@ export default [
}, },
plugins: [ plugins: [
typescript() typescript()
] ],
external: ['axios', 'js-cookie', 'blueimp-md5', 'qs', 'mathjs']
}, },
/** /**
* umd 版本兼容es5 * umd 版本兼容es5
...@@ -23,16 +24,25 @@ export default [ ...@@ -23,16 +24,25 @@ export default [
output: { output: {
file: 'dist/index.umd.js', file: 'dist/index.umd.js',
name: 'YDLToolKit', name: 'YDLToolKit',
format: 'umd' format: 'umd',
globals: {
qs: 'qs',
axios: 'axios',
'js-cookie': 'Cookies',
'blueimp-md5': 'md5'
}
}, },
plugins: [ plugins: [
typescript(), typescript(),
nodeResolve({ nodeResolve({
dedupe: ['mathjs'] browser: true,
}), }),
commonjs(), commonjs(),
json(), json(),
babel() babel({
] babelHelpers: 'inline'
}),
],
external: ['axios', 'js-cookie', 'blueimp-md5', 'qs']
} }
] ]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment