-
-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathrollup.config.dev.js
More file actions
48 lines (45 loc) · 1.1 KB
/
rollup.config.dev.js
File metadata and controls
48 lines (45 loc) · 1.1 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
import resolve from '@rollup/plugin-node-resolve';
import esbuild from 'rollup-plugin-esbuild';
import serve from 'rollup-plugin-serve';
import json from '@rollup/plugin-json';
const onwarn = (warning, warn) => {
if (warning.code === 'THIS_IS_UNDEFINED' && warning.id?.includes('/node_modules/')) {
return;
}
warn(warning);
};
export default {
input: 'src/boilerplate-card.ts',
output: {
file: './dist/boilerplate-card.js',
format: 'es',
inlineDynamicImports: true,
},
plugins: [
resolve(),
esbuild({ target: 'es2022' }),
json(),
serve({
contentBase: './dist',
host: '0.0.0.0',
port: 5000,
allowCrossOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
'Cache-Control': 'no-cache, no-store, must-revalidate',
'Pragma': 'no-cache',
'Expires': '0',
},
}),
],
watch: {
include: 'src/**',
exclude: 'node_modules/**',
buildDelay: 500,
chokidar: {
usePolling: true, // Required for reliable file detection on Docker volume mounts
interval: 1000,
},
},
onwarn,
};