Is here anybody who know how to make PrimeNG under Webpack working?
We have project on angular2-webpack-starter but the PrimeNG have todo just with System.js loader
I get the point when the PrimeNG is loading fine, but i can get success with PrimeUI library... let say for example file primeng/components/togglebutton/togglebutton.ts
error TS2503: Cannot find namespace 'PrimeUI'.
I even tried magic formula with declare in ...togglebutton.ts
declare var PrimeUI:any;
and in my webpack.config
plugins: [
new webpack.ProvidePlugin({
PrimeUI: 'primeui',
})
.
.
],
but if I try something like
import * as PrimeUI from 'primeui';
error TS2307: Cannot find module 'primeui'.
I just remind I did npm install primeui
and the primeui
is present in node_modules
with all dependencies
If you are getting error on :
import * as PrimeUI from 'primeui';
You need to do
declare module 'primeui' {
var foo:any;
export = foo
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With