Closed shawx closed 8 years ago
HI,when I use catch an error:
TypeError: sprites is not a function
How to fixed it?
I'm also seeing a similar error when trying to use this with gulp and postcss: TypeError: object is not a function
@shawx can you re-open this ticket? Unless you have a solution in which case can you post the solution?
The problem was in dropped support for module.exports
in babel-plugin-transform-es2015-modules-commonjs
. Now everything should work as expected.
/cc @shawx @tanc @cnt1992
Use a slightly different require.
var sprites = require('postcss-sprites').default;
See Kill CommonJS default export behaviour - babel/babel#2212
@vvasilev- thx,It's helpful,My friend also found the problem.
@shawx Your gulp task is working or not? I use this plugin with gulp like you and it was not work, Do you resove it?
@wklc2014 var sprites = require('postcss-sprites').default;
vvasilev given the answer.
This my configuration files,but it doesn't work... How to configure the file properly?
thanks.