@@ -26,7 +26,7 @@ const lib = {
2626 external : [ "three" ] ,
2727 plugins : [ resolve ( ) , string ( {
2828 include : [ "**/*.frag" , "**/*.vert" ]
29- } ) ]
29+ } ) ] . concat ( process . env . NODE_ENV === "production" ? [ babel ( ) ] : [ ] )
3030
3131} ;
3232
@@ -40,7 +40,9 @@ const demo = {
4040 } ,
4141
4242 external : [ "three" ] ,
43- plugins : lib . plugins
43+ plugins : [ resolve ( ) , string ( {
44+ include : [ "**/*.frag" , "**/*.vert" ]
45+ } ) ] . concat ( process . env . NODE_ENV === "production" ? [ babel ( ) ] : [ ] )
4446
4547} ;
4648
@@ -52,7 +54,9 @@ export default [lib, demo].concat((process.env.NODE_ENV === "production") ? [
5254 file : "build/" + pkg . name + ".min.js"
5355 } ) ,
5456
55- plugins : lib . plugins . concat ( [ babel ( ) , minify ( {
57+ plugins : [ resolve ( ) , string ( {
58+ include : [ "**/*.frag" , "**/*.vert" ]
59+ } ) ] . concat ( [ babel ( ) , minify ( {
5660 bannerNewLine : true ,
5761 sourceMap : false ,
5862 comments : false
@@ -66,7 +70,9 @@ export default [lib, demo].concat((process.env.NODE_ENV === "production") ? [
6670 file : "public/demo/index.min.js"
6771 } ) ,
6872
69- plugins : demo . plugins . concat ( [ babel ( ) , minify ( {
73+ plugins : [ resolve ( ) , string ( {
74+ include : [ "**/*.frag" , "**/*.vert" ]
75+ } ) ] . concat ( [ babel ( ) , minify ( {
7076 sourceMap : false ,
7177 comments : false
7278 } ) ] )
0 commit comments