chore(cli): add exts constants

This commit is contained in:
陈嘉涵
2019-11-29 13:23:49 +08:00
parent 51d2512311
commit afc6113938
3 changed files with 12 additions and 4 deletions
+7 -3
View File
@@ -1,8 +1,12 @@
import sass from 'sass';
// @ts-ignore
import FriendlyErrorsPlugin from '@nuxt/friendly-errors-webpack-plugin';
import sass from 'sass';
import { VueLoaderPlugin } from 'vue-loader';
import { POSTCSS_CONFIG_FILE } from '../common/constant';
import {
STYLE_EXTS,
SCRIPT_EXTS,
POSTCSS_CONFIG_FILE
} from '../common/constant';
const CSS_LOADERS = [
'style-loader',
@@ -20,7 +24,7 @@ const CSS_LOADERS = [
export const baseConfig = {
mode: 'development',
resolve: {
extensions: ['.js', '.ts', '.tsx', '.jsx', '.vue', '.less']
extensions: [...SCRIPT_EXTS, ...STYLE_EXTS]
},
module: {
rules: [