Alberplz / angular2-color-picker

Angular 2 Color Picker Directive, no dependences required.
MIT License
185 stars 82 forks source link

a.Rgba is not a constructor (angular 2 release + webpack) #41

Closed forik closed 7 years ago

forik commented 7 years ago

Using angular 2 release version with weback getting error "a.Rgba is not a constructor". Seems like #38 should resolve the issue.

Update Issue appears only with minified code

new UglifyJsPlugin({
        beautify: false, //prod
        mangle: { screw_ie8 : true, keep_fnames: true }, //prod
        compress: { screw_ie8: true }, //prod
        comments: false //prod
    }
forik commented 7 years ago

I was importing a module in a wrong way. Closing the issue

madebysoren commented 7 years ago

Hi @forik. I'm experiencing the same; how did you resolve this issue?

forik commented 7 years ago

@madebysoren I don't remember what exactly caused the problem. Referring to the comment that I left above seems like that it was an import problem. This is how I am importing it now: import { ColorPickerModule } from 'angular2-color-picker'; And in module:

imports: [
        CommonModule,
        FormsModule,
        ColorPickerModule
    ]