简体   繁体   中英

Bundling textAngular and angular-sanitize with webpack

I'm currently in the process of migrating a project (ng 1.5.8) from gulp pipeline to webpack.
I'm facing an issue where textAngular gives me the following error message Module 'ngSanitize' is not available .
if I add a require('angular-sanitize') before the require('textangular') then I get the following error message The textAngular-sanitize provider has been replaced by another -- have you included angular-sanitize by mistake?
I've tried playing with the externals of my webpack config with no luck so far. I've also tried using angular-module-sanitize, didn't work either.
So here is my question: how can I configure properly webpack + my requires so textAngular has the proper dependencies provisionned? Thanks!

finnaly got it to work.
The solution is to: - not require angular-sanitize
- not do anything special to the webpack config
- use these lines to require text angular instead (the generic one was including to much stuff)
require('../../node_modules/textangular/dist/textAngular-sanitize.min'); require('../../node_modules/textangular/dist/textAngular.umd');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM