You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on porting over https://github.com/aurelia-ui-toolkits/aurelia-mdc-web to Aurelia 2. Porting aside, when I attempt to consume the v2 version of the plugin in the default npx makes aurelia skeleton with Webpack, it complains about various .html files being imported not having a loader.
To fix this, I had to modify the default HTML loader and remove the exclusion rule for node modules:
If you start an Aurelia 2 plugin project, the html files will be compiled by @aurelia/webpack-loader into js code during npm run build.
The final npm package contains no original html file. Hence when you consume this new plugin package in an app project, there is no .html issue anymore because all the plugin package exposes is one dist js file.
This is different from Aurelia 1 which deals with html at runtime, not compile time. So html file retains as html file in Aurelia 1 plugin package. This is not the case anymore for Aurelia 2 plugin.
So setup Aurelia 2 plugin project properly, the html files will be handled in build time.
It seems we don't need this ticket, as the original usage of npx makes Aurelia wasn't right, as it was for app instead of plugin. Let's close this @Vheissu ?
馃悰 Bug Report
I have been working on porting over https://github.com/aurelia-ui-toolkits/aurelia-mdc-web to Aurelia 2. Porting aside, when I attempt to consume the v2 version of the plugin in the default
npx makes aurelia
skeleton with Webpack, it complains about various.html
files being imported not having a loader.To fix this, I had to modify the default HTML loader and remove the exclusion rule for node modules:
You can replicate this issue by installing
@aurelia2-mdc-web/all
in a fresh Aurelia 2 project usingmakes
and pulling in some of the packagesThe text was updated successfully, but these errors were encountered: