This is a migrated thread and some comments may be shown as answers.

Kendo i18n and Webpack

1 Answer 14 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Fooa
Top achievements
Rank 1
Fooa asked on 24 Feb 2021, 07:56 PM

I am looking for a way to exclude Kendo from generating items during my webpack build. I am using the custom webpack builder found here: https://www.npmjs.com/package/@angular-builders/custom-webpack to do some modifications to the webpack build, but only using the copy-plugin from webpack to copy a single file.

My package.json has:
"@progress/kendo-angular-intl": "^2.0.2",
"@progress/kendo-angular-l10n": "^2.0.2",

The angular.json has:

 

"architect": { "build":{ "builder": "@angular-builders/custom-webpack:browser", "options": { "customWebpackConfig": { "path": "./extra-webpack.config.js", "mergeStrategies": { "externals": "replace" } },

 

Webpack cofig has:
externals:{

kendo:"kendo"

}.

 

The problem is I keep getting all the kendo files being built for internationalization. I dont want them, and would like to exclude them. I dont know what I am doing incorrectly. If anyone could help that would be great!

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 26 Feb 2021, 02:19 PM

Hеllo,

I suspect that the 'externals' configuration is unable to recognize the provided string as a particular dependency. Instead, try passing a regular expression that would match all dependencies that contain 'kendo" in their name.
On a side note, please mind that this question is not directly related to Kendo UI for Angular per se, but is rather specific to Webpack itself.

Regards,
Alexander Popov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Fooa
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or