1 Star 0 Fork 0

奇异的忧伤/mooc-blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.mix.js 1.38 KB
一键复制 编辑 原始数据 按行查看 历史
奇异的忧伤 提交于 2018-11-27 19:45 . 首次提交
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 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")
]
},
}
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/lklkdawei/mooc-blog.git
git@gitee.com:lklkdawei/mooc-blog.git
lklkdawei
mooc-blog
mooc-blog
master

搜索帮助