Si javascript tuviera un preprocesador 'C like', lo que quiero hacer se vería así ...
#define LOCAL #if LOCAL import * as THREE from '../three.js' import { GUI } from '../three.js/examples/jsm/libs/dat.gui.module' import { TWEEN } from '../three.js/examples/jsm/libs/lil-gui.module.min.js' import * as BufferGeometryUtils from '../three.js/examples/jsm/utils/BufferGeometryUtils.js' #elif // Use for website import * as THREE from 'https://cdn.skypack.dev/three@0.133.1/build/three.module.js' import { GUI } from 'https://cdn.skypack.dev/three@0.138.1/examples/jsm/libs/lil-gui.module.min.js' import { TWEEN } from 'https://cdn.skypack.dev/three@0.133.1/examples/jsm/libs/tween.module.min' import * as BufferGeometryUtils from 'https://cdn.skypack.dev/three@0.133.1/examples/jsm/utils/BufferGeometryUtils.js' #endifBásicamente, quiero minimizar la cantidad de edición que necesito hacer en todos los archivos de mi proyecto cuando cambio de un servidor web alojado localmente al servidor web de mi sitio web.