2 Star 0 Fork 0

antiquated/Qinglog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.mix.js 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
DarKnight 提交于 2020-03-09 13:03 . init
const mix = require('laravel-mix');
const path = require('path');
const webpack = require('webpack');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
let config = {
resolve: {
alias: {
'config': 'js/config',
'lang': 'js/lang',
'plugins': 'js/plugins',
'vendor': 'js/vendor',
'dashboard': 'js/dashboard',
'home': 'js/home',
'js': 'js',
},
modules: [
'node_modules',
path.resolve(__dirname, "resources")
]
},
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
]
}
if (!process.argv.includes('--hot')) {
config = Object.assign(config, {
output: {
publicPath: "/",
chunkFilename: 'js/[name].[chunkhash].js'
}
})
}
mix.webpackConfig(config)
let themes = [
'resources/sass/themes/default-theme.scss',
'resources/sass/themes/gray-theme.scss',
];
themes.forEach((item) => {
mix.sass(item, 'public/css/themes')
})
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.js('resources/js/home.js', 'public/js')
.sass('resources/sass/home.scss', 'public/css')
if (mix.inProduction()) {
mix.version()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/antiquated/Qinglog.git
git@gitee.com:antiquated/Qinglog.git
antiquated
Qinglog
Qinglog
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385