-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
36 lines (35 loc) · 971 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
34
35
36
const { swc, defineRollupSwcOption } = require('rollup-plugin-swc3')
const { copy } = require('@web/rollup-plugin-copy')
const { resolve } = require('path')
module.exports = {
input: {
background: resolve(__dirname, './src/background.ts'),
content: resolve(__dirname, './src/content.ts'),
},
output: {
dir: resolve(__dirname, './dist'),
format: 'es'
},
plugins: [
copy({
patterns: '**/*.{ico,png,json}',
rootDir: resolve(__dirname, './public')
}),
swc(defineRollupSwcOption({
// All options are optional
include: /\.[jt]sx?$/, // default
exclude: /node_modules/, // default
// tsconfig: './tsconfig.json', // default
// And add your swc configuration here!
// "filename" will be ignored since it is handled by rollup
jsc: {
parser: {
syntax: 'typescript',
tsx: false,
decorators: true,
},
target: 'es5'
}
}))
]
}