1 Star 0 Fork 300

邓铨/青梧商城B2B2C

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.mix.js 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
青梧商城 提交于 2022-02-24 12:01 . freight bug .
const mix = require('laravel-mix');
const path = require('path')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
require('laravel-mix-polyfill');
mix.js('resources/js/app.js', 'public/dist/js').vue({ version: 3 })
.sass('resources/js/plugins/css/base.scss','public/css')
// .postCss('resources/css/app.css', 'public/dist/css', [
// //
// ])
.setPublicPath('public/dist')
.setResourceRoot('/dist/')
.polyfill({
enabled: true,
useBuiltIns: "usage",
targets: {"firefox": "50", "ie": 11},
})
.webpackConfig({
externals: {
'vue': 'Vue',//这些是你不需要webpakc帮你打包的库
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'element-plus': 'ElementPlus',
'dayjs':'dayjs',
'qrcode.vue':'QrcodeVue',
'clipboardjs':'ClipboardJS',
'g2plot':'G2Plot',
'amap-loader':'AMapLoader',
// 'vue-i18n':'VueI18n',
},
output: {
publicPath: '/dist/',
filename: '[name].js',
chunkFilename : '[name].js?id=[chunkhash:20]'
},
resolve: {
alias: {
'@': path.resolve('resources/js/')
}
}
})
.version();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/dengq666/qwshop.git
git@gitee.com:dengq666/qwshop.git
dengq666
qwshop
青梧商城B2B2C
master

搜索帮助