'use strict'
const VueLoaderPlugin = require('vue-loader/lib/plugin')
var MiniCssExtractPlugin = require('mini-css-extract-plugin')
const StyleLintPlugin = require('stylelint-webpack-plugin')
module.exports = {
mode: 'development', /* 设置为开发环境*/
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
hotReload: true /* 开启热重载*/
}
},
/* 应用普通的js以及vue中的js*/
{
test: /\.js$/,
loader: 'babel-loader'
},
/* 将应用到普通的.css文件中以及vue中<style> */
{
test: /\.css$/,
use: [
process.env.NODE_ENV !== 'production' ? 'vue-style-loader' : MiniCssExtractPlugin.loader
],
loader: [
'vue-style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
i
关于vue-loader的配置
最新推荐文章于 2023-04-12 22:44:10 发布