-
Notifications
You must be signed in to change notification settings - Fork 39
Loader not working correctly with js files #58
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
Comments
This is intended behavior. The loader does not go inside your |
Now I get it. This is not related to module: {
rules: [
{
test: /\.ts$/,
use: [ "awesome-typescript-loader", "angular2-template-loader", "angular-router-loader" ]
}
]
}, Now the thing is that this loader doesn't work correctly with .js files. I mean, yes It does work if I add the rule to run the loader with js files like this: module: {
rules: [
{
test: /\.ts$/,
use: [ "awesome-typescript-loader", "angular2-template-loader", "angular-router-loader" ]
},
{
test: /\.js$/,
use: [ "angular-router-loader" ]
}
]
}, because it converts the instruction to a promise, but it simply doesn't work because the Webpack bundling process throws the following error:
Is worth noting that carbonldp-panel = ProjectB. The only workaround to work this out is by generating my dist package of ProjectB as the src files, I mean I am now shipping the |
Support for plain JS files released as |
How can I make this loader work with an
npm link
ed dependency?I have two projects
Project A
andProject B
.Project B
is linked withnpm link
and it provides modules toproject A
.The loader works fine when I lazy load on app.routing.ts of
Project A
:This correctly produces the instruction to lazy load the Module from
Project B
:But...
On MyAppsModule (from Project B) I also have a lazy loaded child with the following instruction:
The thing is that the loader doesn't change the import of the module of
Project B
, it keeps the result intact, it produces the following:Which ends up breaking my app with the message:
For now I am "lazy loading" the module by doing the manual import of the module and using it in the
loadChildren
option, but as far as I know, that's not lazy loading a module per se. (Correct me if I am wrong)Do you guys know how can I make this loader work with an
npm link
ed dependency?Thanks in advance.
Webpack@2.2.1
angular-router-loader@0.5.0
The text was updated successfully, but these errors were encountered: