chore: fix css error #3069

pull/3079/head
undefined 2020-10-31 14:09:09 +08:00
parent 93629a8ac8
commit 5696b19081
18 changed files with 2 additions and 10 deletions

View File

@ -108,12 +108,12 @@ function babelify(js, modules) {
let stream = js.pipe(babel(babelConfig)).pipe(
through2.obj(function z(file, encoding, next) {
this.push(file.clone());
if (file.path.match(/\/style\/index\.(js|jsx)$/)) {
if (file.path.match(/\/style\/index\.(js|jsx|ts|tsx)$/)) {
const content = file.contents.toString(encoding);
file.contents = Buffer.from(
content.replace(/\/style\/?'/g, "/style/css'").replace(/\.less/g, '.css'),
);
file.path = file.path.replace(/index\.(js|jsx)$/, 'css.js');
file.path = file.path.replace(/index\.(js|jsx|ts|tsx)$/, 'css.js');
this.push(file);
next();
} else {

View File

@ -1,8 +0,0 @@
import '../../style/index.less';
import './index.less';
// style dependencies
import '../../empty/style';
import '../../checkbox/style';
import '../../button/style';
import '../../input/style';