I am upgrading my Angular 11/Webpac 4 project to Angular 14 and Webpack 5.
The issue in this post has been reported many times, but I haven't found a solution that matches the problem that I am having.
Usually, a loader in the webpack configuration is incomplete or missing for certain file types. But as you can see below, the build command complains about the import statement.
Why does it complain about an import? Shouldn't webpack use the build code (.js) created by tsc?
./src/app/app.module.ts:29:18 - Error: Module parse failed: Unexpected token (29:18)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { NgxPopperjsModule, NgxPopperjsPlacements, NgxPopperjsTriggers } from 'ngx-popperjs';
|
> function initApp(): () => Promise<void> {
| return () => {
| const p = [];