Browse Source

KERNEL-10608 refactor: 适配一下打包改成绝对路径的改动

es6
Zhenfei.Li 3 years ago
parent
commit
ce0ba59af8
  1. 3
      lib/prepublish/prepublish.js

3
lib/prepublish/prepublish.js

@ -45,7 +45,8 @@ function finalizeCompile() {
let lessContent = ''; let lessContent = '';
bundleWithoutNormalize.forEach(path => { bundleWithoutNormalize.forEach(path => {
lessContent += `@import "../.${path}";\n`; const relativePath = path.replace(/.*src\/less/, 'src/less').replace(/.*public\/less/g, 'public/less');
lessContent += `@import "../../${relativePath}";\n`;
}); });
writeFileSync( writeFileSync(

Loading…
Cancel
Save