-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
34 lines (32 loc) · 949 Bytes
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import copy from 'rollup-plugin-copy'; // 引入 rollup-plugin-copy 插件
export default {
input: 'src/gewe-notify-card.js',
output: {
file: 'dist/gewe-notify-card.js',
format: 'iife',
name: 'GeweNotifyCard',
},
plugins: [
resolve(),
commonjs(),
babel({
babelHelpers: 'bundled',
presets: [
['@babel/preset-env', { targets: '> 0.25%, not dead' }],
],
plugins: [
["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
],
}),
// 添加 rollup-plugin-copy 配置
copy({
targets: [
{ src: 'src/images/*', dest: 'dist/images' } // 将 src/images 下的所有文件复制到 dist/images 目录
]
})
],
};