-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
46 lines (40 loc) · 1.32 KB
/
rollup.config.js
File metadata and controls
46 lines (40 loc) · 1.32 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
import commonjs from 'rollup-plugin-commonjs';
import resolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
import pkg from './package.json';
const extensions = [
'.js', '.jsx', '.ts', '.tsx',
];
export default {
external: [],
input: "src/plentimon.ts",
output: {
file: "lib/index.js",
format: "cjs"
},
plugins: [
resolve({
// use "module" field for ES6 module if possible
module: true, // Default: true
// use "jsnext:main" if possible
// – see https://github.com/rollup/rollup/wiki/jsnext:main
jsnext: true, // Default: false
// use "main" field or index.js, even if it's not an ES6 module
// (needs to be converted from CommonJS to ES6
// – see https://github.com/rollup/rollup-plugin-commonjs
main: true, // Default: true
// not all files you want to resolve are .js files
extensions, // Default: [ '.mjs', '.js', '.json', '.node' ]
// If true, inspect resolved files to check that they are
// ES2015 modules
modulesOnly: true // Default: false
}),
babel({
exclude: "node_modules/**", // only transpile our source code
extensions,
include: ['src/**/*'],
plugins: ["@babel/plugin-external-helpers"],
presets: [["@babel/preset-env", { modules: false }]]
})
]
};