mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] gulp-less import (#2319)
This commit is contained in:
parent
569c1c6063
commit
29d2024348
@ -1,3 +1,4 @@
|
||||
const path = require('path');
|
||||
const gulp = require('gulp');
|
||||
const less = require('gulp-less');
|
||||
const csso = require('gulp-csso');
|
||||
@ -7,7 +8,9 @@ const postcss = require('gulp-postcss');
|
||||
gulp.task('compile', () => (
|
||||
gulp
|
||||
.src(['../es/**/*.less', '../lib/**/*.less'])
|
||||
.pipe(less())
|
||||
.pipe(less({
|
||||
paths: [path.resolve(__dirname, 'node_modules')]
|
||||
}))
|
||||
.pipe(postcss())
|
||||
.pipe(csso())
|
||||
.pipe(gulp.dest(file => file.base.replace('.less', '.css')))
|
||||
|
@ -61,7 +61,12 @@ module.exports = {
|
||||
'style-loader',
|
||||
'css-loader',
|
||||
'postcss-loader',
|
||||
'less-loader'
|
||||
{
|
||||
loader: 'less-loader',
|
||||
options: {
|
||||
paths: [path.resolve(__dirname, 'node_modules')]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
@import '../style/var';
|
||||
@import '~@vant/icons/src/index.less';
|
||||
@import '@vant/icons/src/index.less';
|
||||
|
||||
.van-icon {
|
||||
&--image {
|
||||
|
@ -1 +1 @@
|
||||
@import '~@vant/icons/src/encode.less';
|
||||
@import '@vant/icons/src/encode.less';
|
||||
|
Loading…
x
Reference in New Issue
Block a user