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

262
Views
webpack: how to switch between package.json alternatives to main attribute (unpkg, main:src, source, jsnext:main, main:umd, jsdelivr)?

How to switch webpack between package.json alternatives to main attribute: unpkg, main:src, source, jsnext:main, main:umd, jsdelivr when building bundle (to set up get source from them) ?

I know that some loaders prefer e.g. 'module' if it exists but I expect there should be also "manual" directive in webpack config: prefer another attribute for concreate dependency.

I have tried to guess is it possible with aliases syntax, but this doesn't work:

resolve: {
    alias: {
      "@popperjs/core": "main:umd"
    },
  },

Is there the standard way to open the 'package.json' of dependecy by its name? Then I would be able to parse it and put the path I need as alias.

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!