Commit 134d4564 by xuzhenzhao

chore(custom): rollup config

parent c2f23630
{
"mode": "exit",
"mode": "pre",
"tag": "next",
"initialVersions": {
"@ydl-packages/toolkit": "1.0.1-next.7"
"@ydl-packages/toolkit": "1.0.1-next.8"
},
"changesets": [
"angry-carrots-rest",
......
......@@ -3,8 +3,7 @@
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": "3.22",
"useBuiltIns": false,
"targets": {
"chrome": "58",
"ie": "11"
......
......@@ -31,11 +31,9 @@
"dependencies": {
"axios": "^0.27.2",
"blueimp-md5": "^2.19.0",
"consola": "^2.15.3",
"js-cookie": "^3.0.1",
"mathjs": "^11.0.1",
"qs": "^6.11.0",
"regenerator-runtime": "^0.13.9"
"qs": "^6.11.0"
},
"devDependencies": {
"@babel/core": "^7.18.10",
......
......@@ -2,7 +2,7 @@ import typescript from 'rollup-plugin-typescript2'
import json from '@rollup/plugin-json';
import commonjs from '@rollup/plugin-commonjs';
import {nodeResolve} from '@rollup/plugin-node-resolve';
import { babel } from '@rollup/plugin-babel';
import {babel} from '@rollup/plugin-babel';
export default [
{
......@@ -13,7 +13,8 @@ export default [
},
plugins: [
typescript()
]
],
external: ['axios', 'js-cookie', 'blueimp-md5', 'qs', 'mathjs']
},
/**
* umd 版本兼容es5
......@@ -23,16 +24,25 @@ export default [
output: {
file: 'dist/index.umd.js',
name: 'YDLToolKit',
format: 'umd'
format: 'umd',
globals: {
qs: 'qs',
axios: 'axios',
'js-cookie': 'Cookies',
'blueimp-md5': 'md5'
}
},
plugins: [
typescript(),
nodeResolve({
dedupe: ['mathjs']
browser: true,
}),
commonjs(),
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