1 Star 1 Fork 2

王东博/vue-endless-h5-game

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
bastarder 提交于 8年前 . fix some error
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: './src/app.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: 'dist/',
filename: 'build.js'
},
resolveLoader: {
root: path.join(__dirname, 'node_modules'),
},
resolve: {
alias:{
vue: 'vue/dist/vue.js',
static : '../assets'
}
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
},
{
test: /\.(png|jpg|gif|svg|wav|ogg|wma|otf)$/,
loader: 'file',
query: {
name: '[name].[ext]?[hash]'
}
}
]
},
devServer: {
historyApiFallback: false,
noInfo: true
},
devtool: '#eval-source-map'
}
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
])
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangdongbo5/vue-endless-h5-game.git
git@gitee.com:wangdongbo5/vue-endless-h5-game.git
wangdongbo5
vue-endless-h5-game
vue-endless-h5-game
master

搜索帮助