1 Star 0 Fork 30

Mufei/appointment-admin

forked from yyyangyx/appointment-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 3.11 KB
一键复制 编辑 原始数据 按行查看 历史
yyyangyx 提交于 2020-03-06 10:38 . feat(权限模块): 添加权限模块
var path = require('path')
var webpack = require('webpack')
// var htmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
},
module: {
rules: [
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
],
},
{
test: /\.scss$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader'
],
},
{
test: /\.sass$/,
use: [
'vue-style-loader',
'css-loader',
'sass-loader?indentedSyntax'
],
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
// Since sass-loader (weirdly) has SCSS as its default parse mode, we map
// the "scss" and "sass" values for the lang attribute to the right configs here.
// other preprocessors should work out of the box, no loader config like this necessary.
'scss': [
'vue-style-loader',
'css-loader',
'sass-loader'
],
'sass': [
'vue-style-loader',
'css-loader',
'sass-loader?indentedSyntax'
]
}
// other vue-loader options go here
}
},
/* {
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},*/
{
test: /\.js$/,
loader: 'babel-loader',
options: {
plugins: ['syntax-dynamic-import']
}
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
},
{ test: /\.(eot|woff|ttf)$/, loader: 'file-loader' }
]
},
/* plugins: [
new htmlWebpackPlugin({
template: '@/layout/layout.vue',
favicon: 'favicon.ico',
inject: true
})
],*/
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': path.resolve(__dirname, './src')
},
extensions: ['*', '.js', '.vue', '.json']
},
devServer: {
historyApiFallback: true,
// noInfo: true,
// overlay: true,
hot: true,
inline: true,
stats: { colors: true },
proxy: {
'/hospital': {
target: 'http://localhost:8080',
pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '/' },
changeOrigin: true
}
}
},
performance: {
hints: false
},
devtool: '#eval-source-map'
}
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/a327958099/appointment-admin.git
git@gitee.com:a327958099/appointment-admin.git
a327958099
appointment-admin
appointment-admin
master

搜索帮助