-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.dev.js
More file actions
44 lines (41 loc) · 959 Bytes
/
rollup.config.dev.js
File metadata and controls
44 lines (41 loc) · 959 Bytes
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
const path = require('path');
const { babel } = require('@rollup/plugin-babel');
const { nodeResolve } = require('@rollup/plugin-node-resolve');
const serve = require('rollup-plugin-server');
const livereload = require('rollup-plugin-livereload');
const pkg = require('./package.json');
const extensions = ['.js', '.ts'];
const resolve = function(...args) {
return path.resolve(__dirname, ...args);
};
module.exports = {
input: resolve('./src/index.ts'),
output: [
// {
// file: resolve('./', 'test/bundle.js'),
// format: 'esm',
// sourcemap: true,
// },
{
file: resolve('./', 'test/bundle.js'),
format: 'iife',
sourcemap: true,
}
],
plugins: [
nodeResolve({
extensions,
modulesOnly: true,
}),
babel({
exclude: 'node_modules/**',
extensions,
}),
livereload(),
serve({
open: true,
port: 8090,
contentBase: 'test',
})
],
};