1 | import json from 'rollup-plugin-json';
|
2 | import commonjs from 'rollup-plugin-commonjs';
|
3 | import nodeResolve from 'rollup-plugin-node-resolve';
|
4 | import replace from 'rollup-plugin-replace';
|
5 | import builtins from 'rollup-plugin-node-builtins';
|
6 | import globals from 'rollup-plugin-node-globals';
|
7 |
|
8 | export default ({
|
9 | entry: 'test/index.test.js',
|
10 | external: ['three'],
|
11 | plugins: [
|
12 | builtins(),
|
13 | nodeResolve({ jsnext: true, module:true }),
|
14 | commonjs({
|
15 | ignoreGlobal: true,
|
16 | exclude: [
|
17 | '**/rollup-plugin-node-globals/**',
|
18 | '**/rollup-plugin-node-builtins/**',
|
19 | '**/three/**'
|
20 | ]
|
21 | }),
|
22 | globals(),
|
23 | json(),
|
24 | replace({
|
25 | ENVIRONMENT: 'TEST',
|
26 | delimiters: [ '${', '}' ]
|
27 | }),
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | replace({
|
33 | include: '**/gl-matrix/src/gl-matrix/common.js',
|
34 | values: { '\'SIMD\' in this': '\'SIMD\' in global' }
|
35 | }),
|
36 | replace({
|
37 | include: '**/rollup-plugin-node-builtins/**',
|
38 | values: { 'global.location.host ': '(!global.location?global.location:global.location.host) ' }
|
39 | })
|
40 | ]
|
41 | });
|