mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(cli): less-loader resolve node_modules
This commit is contained in:
parent
bb917d19d5
commit
8ee35ce5b5
@ -1,8 +1,10 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import FriendlyErrorsPlugin from '@nuxt/friendly-errors-webpack-plugin';
|
import FriendlyErrorsPlugin from '@nuxt/friendly-errors-webpack-plugin';
|
||||||
import sass from 'sass';
|
import sass from 'sass';
|
||||||
|
import { resolve } from 'path';
|
||||||
import { VueLoaderPlugin } from 'vue-loader';
|
import { VueLoaderPlugin } from 'vue-loader';
|
||||||
import {
|
import {
|
||||||
|
CWD,
|
||||||
STYLE_EXTS,
|
STYLE_EXTS,
|
||||||
SCRIPT_EXTS,
|
SCRIPT_EXTS,
|
||||||
POSTCSS_CONFIG_FILE
|
POSTCSS_CONFIG_FILE
|
||||||
@ -56,7 +58,15 @@ export const baseConfig = {
|
|||||||
{
|
{
|
||||||
test: /\.less$/,
|
test: /\.less$/,
|
||||||
sideEffects: true,
|
sideEffects: true,
|
||||||
use: [...CSS_LOADERS, 'less-loader']
|
use: [
|
||||||
|
...CSS_LOADERS,
|
||||||
|
{
|
||||||
|
loader: 'less-loader',
|
||||||
|
options: {
|
||||||
|
paths: [resolve(CWD, 'node_modules')]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user