-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.mjs
45 lines (44 loc) · 1.15 KB
/
rollup.config.mjs
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
import { getBabelOutputPlugin } from '@rollup/plugin-babel'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import nodeExternals from 'rollup-plugin-node-externals'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
import replace from '@rollup/plugin-replace'
export default {
input: './src/index.ts',
output: {
file: './dist/extensions/netacea/index.js',
format: 'cjs',
sourcemap: false
},
plugins: [
typescript({
tsconfig: './tsconfig.json'
}),
json(),
commonjs(),
nodeExternals({
deps: false
}),
nodeResolve({
browser: false,
preferBuiltins: false
}),
getBabelOutputPlugin({
presets: ['@babel/preset-env'],
// All optional newlines and whitespace will be omitted when generating code in compact mode.
compact: true
}),
terser(),
replace({
// strip explicit core module import, not supported by node 6
'require("node:': 'require("'
}),
],
external: [
'f5-nodejs',
'./NetaceaConfig.json'
]
}