-
Notifications
You must be signed in to change notification settings - Fork 53
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
.js suffix for highlightjs dependency #47
Comments
I find that highlight.js is actually using different module names on I'll fix this ASAP. Thank you for your report. |
AMD module name |
Since webpack has some strange behavior on identifying the module name(see webpack/webpack/issues/919), try to trick it with half-strict CommonJS pattern.
Hi @divyakumarjain, should be fixed. It's on |
Hi, I have the same issue while using ES2015 modules with jspm. It try to load highlight.js which does not exist. |
@cAhmad I just released v0.5.0, which should have fixed the issue. |
Hi, thanks for your new release. But, it tries now to load |
@cAhmad I haven't use Though it's very weird that it tries to load I guess you still have to use So it's kind of difficult to support all kinds of module loaders these days... |
Thanks for your reply. I will use the npm version instead of the gihub one. If I got time I'll try some overrides. |
I am trying to use angular-highlightjs with requirejs. because of dependency on "highlight.js" (notice th .js suffix) require tries to load highlightjs from application base path. Following extract from requirejs api
RequireJS also assumes by default that all dependencies are scripts, so it does not expect to see a trailing ".js" suffix on module IDs. RequireJS will automatically add it when translating the module ID to a path. With the paths config, you can set up locations of a group of scripts. All of these capabilities allow you to use smaller strings for scripts as compared to traditional <script> tags.
There may be times when you do want to reference a script directly and not conform to the "baseUrl + paths" rules for finding it. If a module ID has one of the following characteristics, the ID will not be passed through the "baseUrl + paths" configuration, and just be treated like a regular URL that is relative to the document:
source: http://requirejs.org/docs/api.html
Also have a sample to play with.
https://jsfiddle.net/shg4wnfs/3/
The text was updated successfully, but these errors were encountered: