-
-
Notifications
You must be signed in to change notification settings - Fork 713
Usage in Angular-Cli fails with CommonJS Error #102
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Umm, I would have to use doowb/unlazy-loader to get this to work; however, Angular CLI doesn't seem to provided anyway to inject the plugin that I have found without configuring the whole webpack stack myself. |
I meant to mention the unlazy loader earlier... I didn't know it was hard to add webpack loaders to angular-cli. I'll look into this a little more later today. |
Yeah, you can run |
@flamusdiu I don't know much about I don't have the time right now, but if someone else wants to do a PR, we could browserify the source into a distributable file and set the |
|
I forked it and did a quick fix for the moment: flamusdiu/markdown-toc Also, you have to use gray-matter-webpack-build as well as change the require statements. Not sure if there is a good way to change the dependencies when installing. |
Hell, I hit the same problem as markdown-toc#82 |
Okay, so #82 is caused because |
Oooo ... Should get fixed with this -> webpack/node-libs-browser#70 |
@doowd if you don't want to wait, could use the solution in the comment mhart/aws4#46 (comment) changing the function. It might more limited by, though. |
@flamusdiu thanks for digging in more and looking for a solution. On your fork, if you try some of the following things that end up working with angular-cli, I'll review and consider a PR:
Along with your changes to require in the utils directly, I think these would make working with webpack and angular-cli easier. |
I'll try this in the morning |
@doowb I am still getting I'll look at it again when I get off work. |
I have the same problem in a vue-cli project (webpack).
|
I am facing a similar issue: Stackoverflow has anyone faced this issue before? |
I have following function:
When building the application, I get the following message:
From webpack/webpack#2675, I guess the issue might be here: utils.js#L26
The text was updated successfully, but these errors were encountered: