-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
InlineViewDependenciesPlugin doesn't suport 2nd and 3rd arg #140
Comments
Seems reasonable, PR welcome. Two questions, though:
|
Absolutely agree on your first question. On second: Both
But astonishingly, apps built with cli + requirejs/systemjs/webpack totally ignored base url, no matter using So, the api doc lies, baseUrl doesn't work 😆 I guess it might worked long long time ago with jspm based app, plus aurelia-loader implementation at that time. Theoretically, both requirejs and systemjs have no problem to support loading resource from absolute url. But Correct me if I am wrong, I am not webpack user, from my limited understand in webpack, I don't think its module loader can support loading resource from absolute url. Which means you don't need to do anything extra, rather than fixing the |
Interesting, thanks for clarifying all that. The behavior I would expect is that base + uri are combined before being passed to the loader... Never used this feature before, not sure if it's a long standing bug, or if nobody uses it (anymore?). The way module ids are handled is 100% dependent on the loader. In other words, you are correct about webpack: it is not really a loader, only a bundler. To enable that kind of scenarios, one would need to create a composite Aurelia loader... For example one that uses |
Right, the module id is resolved by inlineView implementation when baseUrl is present. Somewhere is broken before module id was finalized. It seems like a broken api feature need to be removed. This would not be a broken change, as Aurelia has policy to against. Because this feature does not work, nobody has code rely on it. |
@3cp well that means if we want ux style to be loaded similarly to user app styles, then theres no way but to let the convention kick in. The issue with that is we cant have nice plugin build process where it create a single dist file instead of bunch of dist files. If its the only way then ill revert this build config changes. @EisenbergEffect is it not acceptable to make user import the style independently? |
You can load inline css string through aurelia api, like aurelia-dialog did. |
Loading css the dialog way isolates the style from user css pipeline. I think ill revert ux build for now |
@jods4, the current implementation assumes inlineView only takes 1 arg. But
inlineView
api supports additional 2nd and 3rd args. Given user suppose to usePLATFORM.moduleName
on 2nd arg. It should be an easy fix for this line tolength >= 1 && length <= 3
. I am too lazy to fork and create PR.webpack-plugin/src/InlineViewDependenciesPlugin.ts
Line 39 in 93f7aff
http://aurelia.io/docs/api/templating/function/inlineView
Just point out, I also has suspicion about 3rd arg
dependencyBaseUrl
, it looks like complicating situation ofPLATFORM.moduleName
in 2rd arg.The text was updated successfully, but these errors were encountered: