This repository has been archived by the owner on Jul 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 318
error occurred when css require in node_modules #261
Comments
it is not work too /* eslint-disable */
const withLess = require('@zeit/next-less')
// const withCss = require('@zeit/next-css')
// fix: prevents error when .less files are required by node
if (typeof require !== 'undefined') {
require.extensions['.less'] = (file) => {}
}
module.exports = withLess({
lessLoaderOptions: {
javascriptEnabled: true,
},
}) |
I recommend add cdn link in head section of _document.js |
I believe the fix is to do the same thing for css that you have for less
|
Closed
Hey @vincentmrlau , did you find a solution for this? |
Hi, thanks for creating an issue. We currently recommend using https://nextjs.org/docs/basic-features/built-in-css-support as the plugins have been deprecated in favor of the built-in support. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
hello,
error occurred when css require in node_modules
log:
It works when I remove the requrement
The text was updated successfully, but these errors were encountered: