-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading WebComponents, consisting of multiple files #75
Comments
We also have that problem and never found a better solution than writing a cli for that use case: https://www.npmjs.com/package/@smallstack/ng-wc-serve If you want to try it out, then please keep in mind that you need to package your webcomponent as production. If you ever find a better solution, please let us know :) |
Hi, my 2 cents. |
we are using ngx-build-plus and exporting as a single file, you might wanna try this out. |
Hey @christianscharr . You'd need to use the // extra-webpack.config.js
module.exports = (config) => {
if (Array.isArray(config.entry.styles)) {
config.entry.main = [...config.entry.main, ...config.entry.styles];
}
return config;
}; This will bundle |
When using @angular/cli to create WebComponents one ends up with at least 2 files for each WebComponent: main.js and styles.js.
But the elementConfig only supports a single URL per element. Sure, I can concatenate the files builded into a single file, this works for production, but not when I want to debug the app locally via
ng serve
:(The text was updated successfully, but these errors were encountered: