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

编译css文件失败 #451

Open
MeetQin opened this issue Jun 19, 2023 · 3 comments
Open

编译css文件失败 #451

MeetQin opened this issue Jun 19, 2023 · 3 comments

Comments

@MeetQin
Copy link

MeetQin commented Jun 19, 2023

在rollup中使用glob包将源目录的js文件都设置为入口文件,然后就会编译失败
[!] (plugin postcss) TypeError: Cannot read property 'modules' of undefined

@MeetQin
Copy link
Author

MeetQin commented Jun 19, 2023

postcss({
plugins: [
autoprefixer(),
cssnano()
],
// 抽离为单独的css文件
extract: 'less/index.less',
extensions: ['.css', '.less'],
include: ['**/*.less'],
}), 这个是我的配置文件

@MeetQin
Copy link
Author

MeetQin commented Jun 19, 2023

在阅读代码的时候发现了,会去读取源目录中的js文件导致失败

@MeetQin
Copy link
Author

MeetQin commented Jun 19, 2023

希望能尽快给一个答复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant