Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: less file yields ModuleParseError with @ import #476

Open
Yexiaoxing opened this issue Aug 20, 2024 · 1 comment
Open

[Bug]: less file yields ModuleParseError with @ import #476

Yexiaoxing opened this issue Aug 20, 2024 · 1 comment
Assignees
Labels
🐞 bug Something isn't working

Comments

@Yexiaoxing
Copy link

Version

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M2 Pro
    Memory: 78.92 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Edge: 127.0.2651.105
    Safari: 17.6
  npmPackages:
    @rsdoctor/webpack-plugin: ^0.3.11 => 0.3.11

Details

When there is a less file and MiniCssExtractPlugin + less-loader configured, the error will show:

ERROR in ../styles/page.less
Module build failed (from ../node_modules/@rsdoctor/core/dist/inner-plugins/loaders/proxy.js):
ModuleParseError: Module parse failed: Unexpected character '@' (1:0)
File was processed with these loaders:
 * ../node_modules/@rsdoctor/core/dist/inner-plugins/loaders/proxy.js
 * ../node_modules/@rsdoctor/core/dist/inner-plugins/loaders/proxy.js
You may need an additional loader to handle the result of these loaders.
> @import "../node_modules/normalize.css/normalize.css";

seems like the less-loader is not taking effect.

Reproduce link

https://stackblitz.com/edit/github-uloart

Reproduce Steps

npm run build
@Yexiaoxing Yexiaoxing added the 🐞 bug Something isn't working label Aug 20, 2024
@easy1090
Copy link
Contributor

I got this issue, I try to reproduce this problem and fixed it.

@easy1090 easy1090 self-assigned this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants