saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.69k stars 215 forks source link

nextron don't recognize less file in node_modules #368

Open liaodalin19903 opened 1 year ago

liaodalin19903 commented 1 year ago

nextron don't recognize less file in node_modules

66C74F76-3181-4493-9178-6F045B29BA3A

../node_modules/.store/antd@4.24.10/node_modules/antd/es/affix/style/index.less
Module parse failed: Unexpected character '@' (1:0)

index.js?e493:594 Uncaught ModuleParseError: Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.

@root-entry-name: default;
| 
| @import './index-pure.less';

demo project in there: https://codesandbox.io/s/fv7cod

alexis-piquet commented 1 year ago

Hey @liaodalin19903, nice to read you. Have you tried to load them in the next.config file? For tierce librairies with components and styling you must load them with webpack.