1 Star 0 Fork 0

一只老熊/vueinit

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
xnck 提交于 2018-12-14 23:02 . 增加router
const path = require('path')
const VueLoader = require('vue-loader/lib/plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode: 'development',
entry: path.resolve(__dirname, 'src/main.js'),
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'main.js'
},
resolve: {
extensions: ['.js', '.vue']
},
module: {
rules: [
{
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [path.resolve(__dirname, 'src'), path.resolve(__dirname, 'test')],
options: {
formatter: require('eslint-friendly-formatter')
}
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
extractCSS: true
}
},
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
]
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
}
]
},
plugins: [
new VueLoader(),
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: 'body'
})
],
devServer: {
contentBase: 'dist',
stats: { colors: true },
historyApiFallback: true,
inline: true
},
performance: {
hints: false
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/blackzs/vueinit.git
git@gitee.com:blackzs/vueinit.git
blackzs
vueinit
vueinit
master

搜索帮助