mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
fix: path error when packaging the component style export file in the windeos environment (#31277)
In the windeos environment: "Lib/style/components.less" will generate the following path "@import "../xx\style\index.less";" This is wrong Now use path.posix.join to be compatible with multi-platform packaging
This commit is contained in:
parent
f9c4539fc7
commit
0984bae2cc
@ -22,7 +22,7 @@ function finalizeCompile() {
|
||||
fs.readdir(componentsPath, (err, files) => {
|
||||
files.forEach(file => {
|
||||
if (fs.existsSync(path.join(componentsPath, file, 'style', 'index.less'))) {
|
||||
componentsLessContent += `@import "../${path.join(file, 'style', 'index.less')}";\n`;
|
||||
componentsLessContent += `@import "../${path.posix.join(file, 'style', 'index.less')}";\n`;
|
||||
}
|
||||
});
|
||||
fs.writeFileSync(
|
||||
|
Loading…
Reference in New Issue
Block a user