1 Star 1 Fork 0

SyncGithub / wechat-menu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.mix.js 991 Bytes
一键复制 编辑 原始数据 按行查看 历史
const mix = require('laravel-mix')
const webpack = require('webpack')
const path = require('path')
// 修改生成 mix-manifest.json 文件的位置
Mix.manifest.refresh = function() {
Mix.inProduction()
&& File.find(path.join('resources', this.name))
.makeDirectories()
.write(this.manifest)
}
const target = Mix.inProduction() ? 'public' : 'public-dev'
mix
.options({
uglify: {
uglifyOptions: {
compress: {
drop_console: true,
},
},
},
})
.setPublicPath(target)
.setResourceRoot('/vendor/wechat-menu')
.js('resources/js/app.js', target)
.sass('resources/sass/app.scss', target)
.copy(target, '../test-wechat-menu/public/vendor/wechat-menu')
.version()
.webpackConfig({
resolve: {
symlinks: false,
alias: {
'@': path.resolve(__dirname, 'resources/js/'),
},
},
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/sync-github/wechat-menu.git
git@gitee.com:sync-github/wechat-menu.git
sync-github
wechat-menu
wechat-menu
master

搜索帮助