@fanswoo/mix-manager
v1.3.37
Published
mix resources
Downloads
21
Readme
@fanswoo/mix-manager
介紹
本套件以 webpack
和 laravel-mix
作為基礎並擴張更多實用的方法。
使用方法
透過編輯 webpack.mix.js
撰寫編譯原始碼的規則。
const { mix } = require('@fanswoo/mix-manager');
mix
.alias({
'@': './resources/js/',
})
.autoload({
jquery: ['$', 'jQuery', 'window.$', 'window.jQuery'],
})
.scssPath({
src: './resources/scss/',
dist: 'public/css/',
pathToDot: true,
includePaths: [
'./resources/scss/',
'./node_modules/@fanswoo/core/resources/scss/',
],
})
.jsPath({
src: './resources/js/controllers/',
dist: 'public/js/controllers/',
})
.babel('./resources/js/service-worker.js', 'public/service-worker.js')
.options({
sourcemaps: false,
processCssUrls: false,
runtimeChunkPath: 'js',
})
.extract([], 'js/vendor.js')
.watchNodeModulesPath('@fanswoo')
.tsLoader()
.ckeditor()
.sourceMaps();
擴充方法
補充說明
更多使用方式請參考 fanswoo-framework 使用教程