-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
48 lines (44 loc) · 1.32 KB
/
webpack.mix.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const mix = require('laravel-mix');
module.exports = {
rules: [
{
test: /\.s(c|a)ss$/,
use: [
'vue-style-loader',
'css-loader',
{
loader: 'sass-loader',
// Requires sass-loader@^8.0.0
options: {
implementation: require('sass'),
sassOptions: {
fiber: require('fibers'),
indentedSyntax: true // optional
},
},
},
],
},
],
};
mix.copyDirectory('node_modules/@fortawesome/fontawesome-free/svgs', 'public/svgs')
.copyDirectory('node_modules/@fortawesome/fontawesome-free/sprites', 'public/sprites')
.copyDirectory('node_modules/@fortawesome/fontawesome-free/webfonts', 'public/webfonts')
.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
if (mix.config.hmr) {
mix.webpackConfig({
output: {
chunkFilename: '[name].js',
}
});
} else {
mix.webpackConfig({
output: {
publicPath: '/',
chunkFilename: '[name].[chunkhash].js',
}
});
}
mix.setPublicPath('public');
mix.setResourceRoot('../');