IgniteUI / igniteui-angular-wrappers

Ignite UI Angular component extensions by Infragistics
http://igniteui.github.io/igniteui-angular-wrappers
MIT License
149 stars 30 forks source link

Using ignitui-angular-wrappers as AOT in Ionic 4 - Can't resolve 'jquery-ui' #297

Closed ebeling closed 5 years ago

ebeling commented 5 years ago

Description

I try to use the wrapper in Ionic 4 App with Angular 7. I installed via npm igniteui-angular-wrappers@7.0.0 , jquery@3.3.1, jquery-ui-bundle@1.12.1-migrate and @infragistics/ignite-ui-full@18.2.99

I used your description "Using Ignite UI Wrappers for Angular inside AOT app. If I try to build my app with ionic-cli (ionic build) and also with angular-cli (ng build) following error throwed:

ERROR in ./node_modules/@infragistics/ignite-ui-full/en/js/modules/infragistics.ui.widget.js Module not found: Error: Can't resolve 'jquery-ui' in 'xxxxx'

Steps to reproduce

  1. create ionic project with "ionic start ionic-aot-test (use 'blank' as template and don't let install App Flow)

  2. insert into app.modules.ts imports like described in README.md of igniteui-angular-wrappers ( in my case I use igTree ):

import 'jquery.js'; import 'jquery-ui-bundle/jquery-ui.min.js'; import '@infragistics/ignite-ui-full/en/js/modules/infragistics.templating.js'; import '@infragistics/ignite-ui-full/en/js/modules/infragistics.util.js'; import '@infragistics/ignite-ui-full/en/js/modules/infragistics.util.jquery.js'; import '@infragistics/ignite-ui-full/en/js/modules/infragistics.datasource.js'; import '@infragistics/ignite-ui-full/en/js/modules/infragistics.ui.widget.js'; import '@infragistics/ignite-ui-full/en/js/modules/infragistics.ui.tree.js';

  1. import IgniteuiModule like described

  2. Try command 'ionic build' or 'ng build'

Than I generated file 'rollup-config.js' in project root with following content: commonjs({ include: ['node_modules/rxjs/', 'node_modules/igniteui-angular-wrappers/', ], namedExports: { 'node_modules/jquery/dist/jquery.min.js': [ 'jquery' ], 'node_modules/jquery-ui-bundle/jquery-ui.min.js': [ 'jquery-ui' ] } })

Result

ERROR in ./node_modules/@infragistics/ignite-ui-full/en/js/modules/infragistics.ui.shared.js Module not found: Error: Can't resolve 'jquery-ui' in 'xxxx ERROR in ./node_modules/@infragistics/ignite-ui-full/en/js/modules/infragistics.ui.widget.js Module not found: Error: Can't resolve 'jquery-ui' in 'xxxxx ....

Expected result

Compilation without errors.

mpavlinov commented 5 years ago

@ebeling Looks like the same as https://github.com/IgniteUI/ignite-ui/issues/1933. @PavlovVasil can you investigate it, please.

ebeling commented 5 years ago

Thank you for your investigation! I tried something more than half a day in order to give you an answer. I think, this has nothing to do with the changes in jquery reported in IgniteUI/ignite-ui#1933 . I'm checking now another way to integrate igniteui in ionic 4 via aot compilation and opened a thread in ionic forum.

PavlovVasil commented 5 years ago

@ebeling You are correct - the problem is not related to the changes in jQuery in IgniteUI/ignite-ui#1933.

Is it possible for you to please send me the sample project that you have created with Ionic (the one you describe in the "Steps to reproduce" section) so I could get a better idea of all the dependencies and imports that have been made there?

That would allow me to further investigate this issue and find what is causing the missing jquery-ui module.

mpavlinov commented 5 years ago

@ebeling Were you able to resolve your issue?

mpavlinov commented 5 years ago

Closing this one as there is no activity.