aurelia-ui-toolkits / aurelia-syncfusion-bridge

27 stars 21 forks source link

v1.0.0 doesn't work with webpack #70

Closed dkent600 closed 6 years ago

dkent600 commented 6 years ago

In reference to https://github.com/aurelia-ui-toolkits/aurelia-syncfusion-bridge/issues/63, a config-builder.js was provided in a .zip file here.

It uses PLATFORM.moduleName that enables webpack module resolution to work.

However, version 1.0 of aurelia-syncfusion-bridge doesn't include this config-builder.js, and thus doesn't work with webpack at all.

karthickthangasamy commented 6 years ago

@dkent600 The PLATFORM.moduleName traces each and every entry from bridge sources and bundles all of them, which increases the production build size. Since, we didn't included PLATFORM.moduleName and recommended the below.

const { AureliaPlugin, ModuleDependenciesPlugin } = require('aurelia-webpack-plugin');

plugins: [
    new AureliaPlugin(),
    new ModuleDependenciesPlugin({
        "aurelia-syncfusion-bridge": ["./grid/grid", "./grid/column"],
    }),
    ....
    ....
]

export async function configure(aurelia) { aurelia.use .standardConfiguration() .developmentLogging() //register aurelia-syncfusion-bridge plugin here .plugin(PLATFORM.moduleName('aurelia-syncfusion-bridge'), (syncfusion) => syncfusion.ejGrid()); await aurelia.start(); await aurelia.setRoot(PLATFORM.moduleName('app')); }



We discussed the same in the below user guide documentation.

[Integration of aurelia-syncfusion-bridge with latest Aurelia skeleton-navigation-esnext-webpack](https://help.syncfusion.com/aurelia/getting-started/skeleton-esnext-latest)

Please let us know if you need further assistance on this. 
dkent600 commented 6 years ago

Thanks for the response, that looks promising. However, when I follow these instructions I get:

"Unable to find module with ID: aurelia-syncfusion-bridge/grid/grid"

when running the application.

dkent600 commented 6 years ago

The problem ^^^ was mine: I have a vendor bundle with a separate webpack config file, and the ModuleDependenciesPlugin bit needs to go in there, not in the app's webpack config file.