-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
36 lines (35 loc) · 1.09 KB
/
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
30
31
32
33
34
35
36
import typescript from 'rollup-plugin-typescript2';
import pkg from './package.json';
import replace from 'rollup-plugin-replace';
import postcss from 'rollup-plugin-postcss';
import string from 'rollup-plugin-string';
export default [
{
input: './src/lib/Lib.ts',
external: ['gl-matrix'],
output: [
{ file: pkg.module, format: 'es', sourcemap: true },
{ file: pkg.main, format: 'cjs', sourcemap: true }
],
plugins: [
string({
// not working....
include: '**/*.glsl',
}),
postcss({
extensions: [ '.css' ],
}),
replace({
'process.env.NODE_ENV': JSON.stringify( process.env['NODE_ENV'] )
}),
typescript({
tsconfigOverride: {
compilerOptions: {
declaration: false //will be run as a separate step via tsc which is more thorough
}
},
useTsconfigDeclarationDir: true,
})
]
}
];