-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.test.prod.js
44 lines (41 loc) · 1.06 KB
/
rollup.config.test.prod.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
37
38
39
40
41
42
43
44
import babel from "@rollup/plugin-babel";
import resolve from "@rollup/plugin-node-resolve";
const extensions = [".ts"];
const babelOptions = {
babelrc: false,
extensions,
exclude: "**/node_modules/**",
babelHelpers: "bundled",
presets: [
[
"@babel/preset-env",
{
loose: true,
modules: false,
targets: ">0.5%, not dead, not ie 11, not op_mini all",
},
],
"@babel/preset-typescript",
],
};
export default [
{
input: `./src/cannon-es-debugger-babylonjs`,
output: {
file: `dist/cannon-es-debugger-babylonjs.js`,
format: "esm",
},
plugins: [resolve({ extensions }), babel(babelOptions)],
external: ["cannon-es", "../node_modules/@babylonjs/core/index.js"],
},
// {
// input: `./src/cannon-es-debugger-babylonjs`,
// output: {
// file: `dist/cannon-es-debugger.cjs.js-babylonjs`,
// format: "cjs",
// exports: "default",
// },
// plugins: [resolve({ extensions }), babel(babelOptions)],
// external: ["cannon-es", "@babylonjs/core"],
// },
];