Closed richmonkeys closed 3 years ago
Error CSS Modules cannot be imported from within node_modules. when trying to import css or scss file directly in jsx components.
CSS Modules cannot be imported from within node_modules.
import styles from './DefaultLayout.module.scss'
The code causing this: https://github.com/SolidZORO/next-plugin-antd-less/blob/4991a3ed4324c0bafb721bd50b45d33c0c631b71/index.js#L93
I think we are supposed to insert the lessModule instead of replacing sassModule with it, in order to existing sass loader and it's features.
Proposed fixed:
rules[1].oneOf.splice(sassModuleIndex, 0, lessModule);
Can I import less in component like this?
Error
CSS Modules cannot be imported from within node_modules.
when trying to import css or scss file directly in jsx components.The code causing this: https://github.com/SolidZORO/next-plugin-antd-less/blob/4991a3ed4324c0bafb721bd50b45d33c0c631b71/index.js#L93
I think we are supposed to insert the lessModule instead of replacing sassModule with it, in order to existing sass loader and it's features.
Proposed fixed: