-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebpackBuildNotifierPlugin is not a constructor #39
Comments
Can you try changing the import to:
|
This was the method I used before, but now it seems like it does not work anymore...
|
Ah, looks like there was no default export in the TS definition. Can you please upgrade to 0.1.32 and try again please? |
Nope, still getting this error above. You can have a look at my webpack file here: https://github.com/muuvmuuv/vscode-sundial/blob/master/webpack.config.ts.off |
OK -- found that the TS definition implied that this plugin is exported as a default ES6 export, which isn't the case (it's currently a commonJS module). I corrected the definition, but now you will need to upgrade to version 1.0.0 and change your import to Let me know how it goes! |
@RoccoC did u pushed the version to NPM? I get no update. np. I will add it manually in my node_modules for testing |
Yes, copied index.d.ts and index.js content into my node_modules and it worked! Thanks :) |
Nevermind, I forgot to do |
Glad it worked out! Thanks! |
When running webpack with ts-node (webpack.config.ts) I get this error:
In a basic JS node application everything seems fine. Maybe this is because
webpack-build-notifier
in not a class?I import it with
import { WebpackBuildNotifierPlugin as BuildNotifier } from 'webpack-build-notifier'
.If it is because it is not a class, it would be great if someone would rewrite it to a class.
Here is an example of a good TypeScript written webpack plugin: https://github.com/johnagan/clean-webpack-plugin/blob/master/src/clean-webpack-plugin.ts
The text was updated successfully, but these errors were encountered: