1
1
import terser from '@rollup/plugin-terser' ;
2
2
import MagicString from 'magic-string' ;
3
3
4
- function addons ( ) {
5
-
6
- return {
7
-
8
- transform ( code , id ) {
9
-
10
- if ( / \/ e x a m p l e s \/ j s m \/ / . test ( id ) === false ) return ;
11
-
12
- code = new MagicString ( code ) ;
13
-
14
- code . replace ( 'build/three.module.js' , 'src/Three.js' ) ;
15
-
16
- return {
17
- code : code . toString ( ) ,
18
- map : code . generateMap ( ) . toString ( )
19
- } ;
20
-
21
- }
22
-
23
- } ;
24
-
25
- }
26
-
27
4
export function glsl ( ) {
28
5
29
6
return {
@@ -49,7 +26,7 @@ export function glsl() {
49
26
50
27
return {
51
28
code : code . toString ( ) ,
52
- map : code . generateMap ( ) . toString ( )
29
+ map : code . generateMap ( )
53
30
} ;
54
31
55
32
}
@@ -74,7 +51,7 @@ function header() {
74
51
75
52
return {
76
53
code : code . toString ( ) ,
77
- map : code . generateMap ( ) . toString ( )
54
+ map : code . generateMap ( )
78
55
} ;
79
56
80
57
}
@@ -95,7 +72,7 @@ function deprecationWarning() {
95
72
96
73
return {
97
74
code : code . toString ( ) ,
98
- map : code . generateMap ( ) . toString ( )
75
+ map : code . generateMap ( )
99
76
} ;
100
77
101
78
}
@@ -108,7 +85,6 @@ const builds = [
108
85
{
109
86
input : 'src/Three.js' ,
110
87
plugins : [
111
- addons ( ) ,
112
88
glsl ( ) ,
113
89
header ( )
114
90
] ,
@@ -122,7 +98,6 @@ const builds = [
122
98
{
123
99
input : 'src/Three.js' ,
124
100
plugins : [
125
- addons ( ) ,
126
101
glsl ( ) ,
127
102
header ( ) ,
128
103
terser ( )
@@ -137,7 +112,6 @@ const builds = [
137
112
{
138
113
input : 'src/Three.js' ,
139
114
plugins : [
140
- addons ( ) ,
141
115
glsl ( ) ,
142
116
header ( )
143
117
] ,
@@ -154,7 +128,6 @@ const builds = [
154
128
{ // @deprecated , r150
155
129
input : 'src/Three.js' ,
156
130
plugins : [
157
- addons ( ) ,
158
131
glsl ( ) ,
159
132
header ( ) ,
160
133
deprecationWarning ( )
@@ -171,7 +144,6 @@ const builds = [
171
144
{ // @deprecated , r150
172
145
input : 'src/Three.js' ,
173
146
plugins : [
174
- addons ( ) ,
175
147
glsl ( ) ,
176
148
header ( ) ,
177
149
deprecationWarning ( ) ,
0 commit comments