Closed graycrow closed 3 years ago
Are the ignore elements with relative specifier? (starts with .
e.x ./
or ../
) I suspect the root cause would be similar to #178
Are the ignore elements with relative specifier? (starts with
.
e.x./
or../
) I suspect the root cause would be similar to #178
Yes, they are.
Looks like I found the reason/solution for this issue. For some unknown reason, I had "module": "amd"
in the tsconfig.json
. After I changed it to ESNext
, the ignored custom elements started working. But "module": "ESNext"
opened yet another layer of issues, e.g. not calling many plugin configure functions because webpack mangles the names of exported functions and also excludes them as unused. I'm digging into it now and probably will open a separate issue.
I'm submitting a bug report
Please tell us about your environment:
Operating System: Linux 5.10.42-1-MANJARO
Node Version: v16.3.0
NPM Version: 7.19.1
JSPM OR Webpack AND Version webpack 5.41.1
Browser: all
Language: all
Current behavior: I keep upgrading to Webpack 5. I have reached a state where both the development build and the production build are built without errors and run without errors. But only the development build created with
webpack serve
works as it should. The production build is displayed with many custom elements missing from the page.Looks like all the custom elements imported from the html pages using
require from
tags are ignored. With enabled dev logging, I can see that all of them are listed underDEBUG [templating] importing resources for [page-file-name]
but then nothing happens and their own dependencies not being imported. Also I have no errors on the browser console. Only if I try to open a different (non-default) route, I get errors likeERROR [app-router] Error: No Aurelia APIs are defined for the element: "DIV"
.Here is my Webpack config.
I would appreciate any help or feedback.