Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

297
Views
¿Cómo puedo seleccionar entre múltiples variantes diferentes de una declaración de importación en javascript?

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' #endif

Bá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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!