|
@@ -24,66 +24,21 @@ function glsl() {
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
-
|
|
|
- entry: (function () {
|
|
|
-
|
|
|
- var env = process.env.BUILD;
|
|
|
-
|
|
|
- if( env === 'production' ) {
|
|
|
-
|
|
|
- return 'src/Three.js';
|
|
|
-
|
|
|
- } else if( env === 'test' ){
|
|
|
-
|
|
|
- return 'test/Three.Unit.js';
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- console.error("Invalid BUILD environment variable: " + env);
|
|
|
- return null;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- })(),
|
|
|
+ entry: 'src/Three.js',
|
|
|
indent: '\t',
|
|
|
plugins: [
|
|
|
glsl()
|
|
|
],
|
|
|
// sourceMap: true,
|
|
|
- targets: (function () {
|
|
|
-
|
|
|
- var env = process.env.BUILD;
|
|
|
-
|
|
|
- if( env === 'production' ) {
|
|
|
-
|
|
|
- return [
|
|
|
- {
|
|
|
- format: 'umd',
|
|
|
- moduleName: 'THREE',
|
|
|
- dest: 'build/three.js'
|
|
|
- },
|
|
|
- {
|
|
|
- format: 'es',
|
|
|
- dest: 'build/three.module.js'
|
|
|
- }
|
|
|
- ];
|
|
|
-
|
|
|
- } else if( env === 'test' ){
|
|
|
-
|
|
|
- return [
|
|
|
- {
|
|
|
- format: 'umd',
|
|
|
- moduleName: 'THREE',
|
|
|
- dest: 'test/unit/three.unit.js'
|
|
|
- }
|
|
|
- ];
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- console.error("Invalid BUILD environment variable: " + env);
|
|
|
- return null;
|
|
|
-
|
|
|
+ targets: [
|
|
|
+ {
|
|
|
+ format: 'umd',
|
|
|
+ moduleName: 'THREE',
|
|
|
+ dest: 'build/three.js'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ format: 'es',
|
|
|
+ dest: 'build/three.module.js'
|
|
|
}
|
|
|
-
|
|
|
- })()
|
|
|
+ ]
|
|
|
};
|