|
@@ -1,5 +1,4 @@
|
|
import babel from '@rollup/plugin-babel';
|
|
import babel from '@rollup/plugin-babel';
|
|
-import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
|
|
import { terser } from 'rollup-plugin-terser';
|
|
import { terser } from 'rollup-plugin-terser';
|
|
|
|
|
|
function glconstants() {
|
|
function glconstants() {
|
|
@@ -272,29 +271,6 @@ ${ code }`;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-function polyfills() {
|
|
|
|
-
|
|
|
|
- return {
|
|
|
|
-
|
|
|
|
- transform( code, filePath ) {
|
|
|
|
-
|
|
|
|
- if ( filePath.endsWith( 'src/Three.js' ) || filePath.endsWith( 'src\\Three.js' ) ) {
|
|
|
|
-
|
|
|
|
- code = 'import \'regenerator-runtime\';\n' + code;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return {
|
|
|
|
- code: code,
|
|
|
|
- map: null
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
const babelrc = {
|
|
const babelrc = {
|
|
presets: [
|
|
presets: [
|
|
[
|
|
[
|
|
@@ -313,8 +289,6 @@ export default [
|
|
{
|
|
{
|
|
input: 'src/Three.js',
|
|
input: 'src/Three.js',
|
|
plugins: [
|
|
plugins: [
|
|
- polyfills(),
|
|
|
|
- nodeResolve(),
|
|
|
|
addons(),
|
|
addons(),
|
|
glconstants(),
|
|
glconstants(),
|
|
glsl(),
|
|
glsl(),
|
|
@@ -339,8 +313,6 @@ export default [
|
|
{
|
|
{
|
|
input: 'src/Three.js',
|
|
input: 'src/Three.js',
|
|
plugins: [
|
|
plugins: [
|
|
- polyfills(),
|
|
|
|
- nodeResolve(),
|
|
|
|
addons(),
|
|
addons(),
|
|
glconstants(),
|
|
glconstants(),
|
|
glsl(),
|
|
glsl(),
|