forked from nytimes/three-loader-3dtiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
29 lines (24 loc) · 890 Bytes
/
rollup.config.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
import typescript from 'rollup-plugin-typescript2';
import externals from 'rollup-plugin-node-externals';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import alias from '@rollup/plugin-alias';
import eslint from '@rollup/plugin-eslint';
import terser from '@rollup/plugin-terser';
import commonjs from '@rollup/plugin-commonjs';
const { NODE_ENV } = process.env;
const name = 'ThreeLoader3DTiles';
const sourcemap = true;
const addSyntheticNamedExportsToSkippedNodeImports = () => ({
load: (importee) => {
if (importee === '\u0000node-resolve:empty.js') {
return {code: 'export default {};', syntheticNamedExports: true};
} else {
return null;
}
}
});
const config = [esmConfig('development'), umdConfig('development')];
if (NODE_ENV === 'production') {
config.push(esmConfig('production'), umdConfig('production'))
}
export default config;