aurelia-contrib / aurelia-open-id-connect

An aurelia adapter for the IdentityModel/oidc-client-js
https://zamboni-app.azurewebsites.net
MIT License
54 stars 18 forks source link

Global Resources defined in plugin not found in bundle #21

Closed jonathaneckman closed 6 years ago

jonathaneckman commented 7 years ago

Bundling with webpack I get the following errors:

Error: Cannot find module './aurelia-open-id-connect/open-id-connect-user-block'. Error: Cannot find module './aurelia-open-id-connect/open-id-connect-role-filter'.

This is coming from plugin.ts

config.globalResources([
    "./open-id-connect-user-block",
    "./open-id-connect-role-filter",
])
ghidello commented 7 years ago

Using the webpack plugin v2.0 (I started learning webpack from this version so I don't know about the previous one) you can workaround the issue specifying the plugin dependencies in your webpack.config.js throught the ModuleDependenciesPlugin:

plugins: [
    new AureliaPlugin(),
    new ModuleDependenciesPlugin({
        "aurelia-open-id-connect": [
            "./open-id-connect-user-block",
            "./open-id-connect-role-filter"
        ]
    })
]
shaunluttin commented 6 years ago

Duplicate: https://github.com/shaunluttin/aurelia-open-id-connect/issues/9