1 Star 0 Fork 0

hesunfly/blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.mix.js 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
hesunfly 提交于 2018-12-28 21:29 . init
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.
|
*/
mix.webpackConfig({
output: {
publicPath: "/",
chunkFilename: 'js/[name].[chunkhash].js'
},
resolve: {
alias: {
'config': 'assets/js/config',
'lang': 'assets/js/lang',
'plugins': 'assets/js/plugins',
'vendor': 'assets/js/vendor',
'dashboard': 'assets/js/dashboard',
'home': 'assets/js/home',
'js': 'assets/js',
},
modules: [
'node_modules',
path.resolve(__dirname, "resources")
]
},
});
let themes = [
'resources/assets/sass/themes/default-theme.scss',
'resources/assets/sass/themes/gray-theme.scss',
];
themes.forEach((item) => {
mix.sass(item, 'public/css/themes').version();
})
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.js('resources/assets/js/home.js', 'public/js')
.sass('resources/assets/sass/home.scss', 'public/css')
.version();
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hesunfly/blog.git
git@gitee.com:hesunfly/blog.git
hesunfly
blog
blog
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385