新增了rollup打包配置;

支持了传统浏览器的引入方式;
This commit is contained in:
2025-08-17 22:50:59 +08:00
parent 7da191231e
commit 451fea75f5
6 changed files with 856 additions and 12 deletions

17
rollup.config.js Normal file
View File

@@ -0,0 +1,17 @@
import babel from 'rollup-plugin-babel'
import { terser } from 'rollup-plugin-terser'
export default {
input: 'src/index.js',
output: {
file: 'dist/wxsdk-pure.js',
format: 'umd',
name: 'wxSDK',
},
plugins: [
babel({
exclude: 'node_modules/**',
}),
terser(), // 可选:压缩代码
],
}