Closed mikaa123 closed 8 years ago
Thank U. I have fixed it another way.
Thanks for the quick move :) However after testing, the problem remains... :(
The code is effectively wrapped in UMD, but the CommonJS export still doesn't work as expected with Babel 6.
This babel plugin should do the trick though: https://github.com/59naga/babel-plugin-add-module-exports
) I`ll dig this problem today.
We got it!) babel-plugin-add-module-exports works fine. I`ve added a test to avoid this bug further. @mikaa123 Thank U for a piece of advice and patience. New version is available in npm. Can we close this issue now?
Awesome! Thanks a lot, glad I could help. Let's close this ;)
Hi there,
When I try to use
postcss-autoreset
, I have the following error:The way I use it is through webpack. Here is the relevent part of my
webpack.config.js
:After some investigation, it turns out that the compiled version of the source code in my
node_modules
is:...Which causes the plugin to be attached to the
.default
property of the exported object.It turns out this is caused by Babel 6 changing the way it handles defaults.
This could be fixed by changing the way
postcss-autoreset
exports the plugin, e.g.:module.exports = postcss.plugin('postcss-autoreset', function (opts) {...
I might work on a PR later on :) The workaround is to use
require('postcss-autoreset').default
.