Fitbit / stats-writer-webpack-plugin

Saves 'stats' object as is
https://fitbit.github.io/stats-writer-webpack-plugin
Apache License 2.0
2 stars 3 forks source link

StatsWriterWebpackPlugin is not a constructor #65

Open dan-lee opened 7 years ago

dan-lee commented 7 years ago

Hi, v1.1.0 works perfectly fine, but with v1.2.0 I get the following error:

TypeError: StatsWriterWebpackPlugin is not a constructor at Object. (/path/to/webpack.config.js:69:5) [...]

Maybe has something to do with d61acdd2e49931740d692b41b55ced958b9f6039

chore(package): removes babel-plugin-add-module-exports

mdreizin commented 7 years ago

@dan-lee I have really sorry that it breaks the code, but babel-plugin-add-module-exports is not compatible with module spec. For now you can use:

const StatsWriterWebpackPlugin = require('stats-writer-webpack-plugin').default;
dan-lee commented 7 years ago

That workaround works, thanks!