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

1.9K
Views
upgrade angular from 12 to 13 added can not use import.meta outside a module

I upgrade my angular project from 12 to 13 but getting error Uncaught SyntaxError: Cannot use 'import.meta' outside a module.I wanted to use both require and import in my project I tried using "type"=module but getting error in webpack.config.js file

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The issue might be related to webpack.config setting the publicPath to 'auto'. You might have to set the relative path. Other option to fix this issue will be to set the scriptType property to 'text/javascript' in the webpack.config as follows:

 module.exports = {
        output: {
            uniqueName: "MyProj",
            publicPath: "auto",
            scriptType: 'text/javascript'
        }

This option will not migrate microfrontend and it bring back the behavior of Angular 12.

A more detailed article on microfrontend upgrade can be found here: https://github.com/angular-architects/module-federation-plugin/blob/main/migration-guide.md

over 4 years ago · Santiago Trujillo 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!