Skip to content

Commit 32cf0d1

Browse files
authored
cleanup (mrdoob#26803)
1 parent 85f9f28 commit 32cf0d1

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

Diff for: utils/build/rollup.config.js

+3-31
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
11
import terser from '@rollup/plugin-terser';
22
import MagicString from 'magic-string';
33

4-
function addons() {
5-
6-
return {
7-
8-
transform( code, id ) {
9-
10-
if ( /\/examples\/jsm\//.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-
274
export function glsl() {
285

296
return {
@@ -49,7 +26,7 @@ export function glsl() {
4926

5027
return {
5128
code: code.toString(),
52-
map: code.generateMap().toString()
29+
map: code.generateMap()
5330
};
5431

5532
}
@@ -74,7 +51,7 @@ function header() {
7451

7552
return {
7653
code: code.toString(),
77-
map: code.generateMap().toString()
54+
map: code.generateMap()
7855
};
7956

8057
}
@@ -95,7 +72,7 @@ function deprecationWarning() {
9572

9673
return {
9774
code: code.toString(),
98-
map: code.generateMap().toString()
75+
map: code.generateMap()
9976
};
10077

10178
}
@@ -108,7 +85,6 @@ const builds = [
10885
{
10986
input: 'src/Three.js',
11087
plugins: [
111-
addons(),
11288
glsl(),
11389
header()
11490
],
@@ -122,7 +98,6 @@ const builds = [
12298
{
12399
input: 'src/Three.js',
124100
plugins: [
125-
addons(),
126101
glsl(),
127102
header(),
128103
terser()
@@ -137,7 +112,6 @@ const builds = [
137112
{
138113
input: 'src/Three.js',
139114
plugins: [
140-
addons(),
141115
glsl(),
142116
header()
143117
],
@@ -154,7 +128,6 @@ const builds = [
154128
{ // @deprecated, r150
155129
input: 'src/Three.js',
156130
plugins: [
157-
addons(),
158131
glsl(),
159132
header(),
160133
deprecationWarning()
@@ -171,7 +144,6 @@ const builds = [
171144
{ // @deprecated, r150
172145
input: 'src/Three.js',
173146
plugins: [
174-
addons(),
175147
glsl(),
176148
header(),
177149
deprecationWarning(),

0 commit comments

Comments
 (0)