1 Star 0 Fork 0

chinahan/vuestudy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 2.65 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require('path');
const VueLoadPlugin = require('vue-loader/lib/plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
app: './src/app.js'
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist')
},
devServer: {
contentBase: path.join(__dirname, "dist"),
hot: true
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.scss$/,
use: [
"style-loader",
"css-loader",
{
loader: "postcss-loader",
options: {
plugins:[
require("postcss-preset-env")()
]
}
},
"sass-loader"
]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
use: [
{
loader: "url-loader",
options: {
limit: 8092,
name: "img/[hash:7].[ext]",
esModule: false
}
}
]
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
use: [
{
loader: "url-loader",
options: {
limit: 8092,
name: "media/[hash:7].[ext]"
}
}
]
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
use: [
{
loader: "url-loader",
options: {
limit: 8092,
name: "font/[hash:7].[ext]"
}
}
]
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
}
]
},
stats: { children: false },
devtool: 'eval-source-map',
plugins: [
new VueLoadPlugin(),
new HtmlWebpackPlugin({
template: "./public/index.html",
title: "项目模板"
})
]
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/jeffery_han/vuestudy.git
git@gitee.com:jeffery_han/vuestudy.git
jeffery_han
vuestudy
vuestudy
master

搜索帮助