mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
fix: no style components
This commit is contained in:
@@ -51,7 +51,8 @@ log('Starting', 'build:style-entries');
|
||||
Object.keys(components).forEach((componentName) => {
|
||||
const dir = path.join(__dirname, '../../lib/', componentName, '/style');
|
||||
const file = path.join(dir, 'index.js');
|
||||
const content = `require('../../vant-css/${componentName}.css');`;
|
||||
const cssPath = path.join(__dirname, '../../lib/vant-css/', `${componentName}.css`);
|
||||
const content = fs.existsSync(cssPath) ? `require('../../vant-css/${componentName}.css');` : '';
|
||||
mkdir(dir);
|
||||
writeFile(file, content);
|
||||
});
|
||||
|
Reference in New Issue
Block a user