新增了rollup打包配置;
支持了传统浏览器的引入方式;
This commit is contained in:
17
rollup.config.js
Normal file
17
rollup.config.js
Normal 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(), // 可选:压缩代码
|
||||
],
|
||||
}
|
Reference in New Issue
Block a user