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
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