windicss / windicss-webpack-plugin

🍃 Windi CSS for webpack ⚡
https://windicss.org/integrations/webpack.html
79 stars 19 forks source link

fix: undefined loader is added into module.rules #80

Closed clarkdo closed 3 years ago

clarkdo commented 3 years ago

In Nuxt.js build with docus, we're setting error ERROR TypeError: Cannot read property 'request' of undefined, I found templateLoader is undefined but got added to webpack module.rules, so webpack is reading request from undefined load which will fail the build, this pr is adding not-null checking when insert templateLoader to module.rules

clarkdo commented 3 years ago

cc @harlan-zw

harlan-zw commented 3 years ago

Thanks @clarkdo

Have merged this in with https://github.com/windicss/windicss-webpack-plugin/pull/81