Skip to content

Commit

Permalink
cleanup (mrdoob#26803)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw authored Sep 20, 2023
1 parent 85f9f28 commit 32cf0d1
Showing 1 changed file with 3 additions and 31 deletions.
34 changes: 3 additions & 31 deletions utils/build/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,6 @@
import terser from '@rollup/plugin-terser';
import MagicString from 'magic-string';

function addons() {

return {

transform( code, id ) {

if ( /\/examples\/jsm\//.test( id ) === false ) return;

code = new MagicString( code );

code.replace( 'build/three.module.js', 'src/Three.js' );

return {
code: code.toString(),
map: code.generateMap().toString()
};

}

};

}

export function glsl() {

return {
Expand All @@ -49,7 +26,7 @@ export function glsl() {

return {
code: code.toString(),
map: code.generateMap().toString()
map: code.generateMap()
};

}
Expand All @@ -74,7 +51,7 @@ function header() {

return {
code: code.toString(),
map: code.generateMap().toString()
map: code.generateMap()
};

}
Expand All @@ -95,7 +72,7 @@ function deprecationWarning() {

return {
code: code.toString(),
map: code.generateMap().toString()
map: code.generateMap()
};

}
Expand All @@ -108,7 +85,6 @@ const builds = [
{
input: 'src/Three.js',
plugins: [
addons(),
glsl(),
header()
],
Expand All @@ -122,7 +98,6 @@ const builds = [
{
input: 'src/Three.js',
plugins: [
addons(),
glsl(),
header(),
terser()
Expand All @@ -137,7 +112,6 @@ const builds = [
{
input: 'src/Three.js',
plugins: [
addons(),
glsl(),
header()
],
Expand All @@ -154,7 +128,6 @@ const builds = [
{ // @deprecated, r150
input: 'src/Three.js',
plugins: [
addons(),
glsl(),
header(),
deprecationWarning()
Expand All @@ -171,7 +144,6 @@ const builds = [
{ // @deprecated, r150
input: 'src/Three.js',
plugins: [
addons(),
glsl(),
header(),
deprecationWarning(),
Expand Down

0 comments on commit 32cf0d1

Please sign in to comment.