1 Star 0 Fork 0

os4us/laravue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 896 Bytes
一键复制 编辑 原始数据 按行查看 历史
Tuan Duong 提交于 2019-06-27 00:20 . Prepare for documentation
const path = require('path');
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
function resolve(dir) {
return path.join(
__dirname,
'/resources/js',
dir
);
}
const rawArgv = process.argv.slice(2);
const args = rawArgv.join(' ');
const report = rawArgv.includes('--report');
let plugins = [];
if (report) {
plugins.push(new BundleAnalyzerPlugin({
openAnalyzer: true,
}));
}
module.exports = {
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
vue$: 'vue/dist/vue.esm.js',
'@': path.join(__dirname, '/resources/js'),
},
},
module: {
rules: [
{
test: /\.svg$/,
loader: 'svg-sprite-loader',
include: [resolve('icons')],
options: {
symbolId: 'icon-[name]',
},
},
],
},
plugins: plugins,
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hustytang/laravue.git
git@gitee.com:hustytang/laravue.git
hustytang
laravue
laravue
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385