cssnext-loader
cssnext-loader copied to clipboard
Wrong behavior on empty css file
Hi,
I have a working setup with cssnext-loader, but if I require an empty css file, instead of getting an empty string, I am getting a json object.
The problem is at line 30 in index.js:
if (result.css)
should be
if (typeof result.css !== 'undefined')
because result.css is empty, and that's correct, but the check assume there was an error. If you want, I can make a PR for that.
cssnext-loader will be deprecated, soon, you should consider using postcss-loader + postcss-cssnext plugin.
Oh. Didn't know that :(
I will keep that issue open so people will see it if they got an issue. Will close if someone fix it or when npm package will be deprecated.