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

293
Views
What is this style of import, that names no symbols and lacks the `from` keyword?
// file api_setup.js
import { ApiProxy } from "vendor-lib"

ApiProxy.configure({ /* ... */ })

export { ApiProxy }
// file service.js
import "./api_setup" // ?

/* ... */

I believe this is old code, so I looked at the NodeJS doc on import from a few years ago, and it doesn't cover anything like import "./api_setup".

What is this style of import called? What does it do?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

See the MDN documentation for import:

Import a module for its side effects only

Import an entire module for side effects only, without importing anything. This runs the module's global code, but doesn't actually import any values.

import '/modules/my-module.js';
about 4 years ago · Juan Pablo Isaza Report
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!