-
Notifications
You must be signed in to change notification settings - Fork 139
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
Materialize import breaks webpack (angular-cli) #82
Comments
@rubyboy Are you accepting PR-s? |
@Sixthdim thanks for the feedback. You can find more details in a similar issue here: #54 @MarkusPint most definitely! See my comments in #54. Maybe two deployment targets, one with and one without materialize-css, would be a good option. This way if someone wants to just import angular-materialize and let it bring all required dependencies (it does need materialize-css) they would use the current deployment. Then, create another entry point without that dependency for other people who want to bring it materialize-css any other way they want. Thanks for offering to contribute. |
This is affecting me too. I'm still not clear on why this affects angular-cli webpack and not the standard seed project? Is there a workaround we can use for the moment to get around this issue? |
@pchristou This mainly affects angular-cli@webpack because it doesn't (yet) support a webpack config file, so there is no way to setup an alias for "materialize" -> "materialize-css", and "materialize" doesn't exist in node_modules. The way it's setup in this project only works with JSPM. I'll see if I can get a PR up today. |
Thanks for the explanation @Sixthdim. |
PR Created: #84 |
…d fixing Webpack and Angular CL BREAKING CHANGE: will require previous clients to update config to use materialize-css. README needs to be updated. #82
OK, PR merged and a new version has been released to npm. I haven't tested it, so please give it a whirl and I hope it will work. |
I'm curious as to why the
materialize-css
package is installed asmaterialize
.Here: https://github.com/InfomediaLtd/angular2-materialize/blob/master/package.json#L99
This causes an error with Webpack:
The only way to get this to work is to create an alias in the build process (webpack, systemjs, etc.), but this is currently not available with the latest angular-cli, and also seems a little unnecessary.
Are you able to install the
materialize-css
package as is, and then just import "materialize-css" here: https://github.com/InfomediaLtd/angular2-materialize/blob/master/src/index.ts#L1Thanks!
The text was updated successfully, but these errors were encountered: