-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.mix.js
40 lines (33 loc) · 958 Bytes
/
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
const mix = require('laravel-mix');
const fs = require('fs-extra');
const rimraf = require("rimraf");
mix.setPublicPath('./dist');
rimraf.sync("./dist");
mix.webpackConfig({
output: {
libraryTarget: 'var',
library: 'AtriatechMedia'
}
});
mix.js(__dirname + '/src/assets/js/app.js', 'js/media.js');
mix.js(__dirname + '/src/assets/js/selector.js', 'js/media-selector.js');
mix.sass( __dirname + '/src/assets/sass/app.scss', 'css/media.css', {
implementation: require('sass'),
sassOptions: {
includePaths: ['./node_modules'],
}
}).options({
processCssUrls: false,
});
mix.sass( __dirname + '/src/assets/sass/selector.scss', 'css/media-selector.css', {
implementation: require('sass'),
sassOptions: {
includePaths: ['./node_modules'],
}
}).options({
processCssUrls: false,
});
fs.copy(__dirname + '/src/assets/extra', `./dist/extra`);
if (mix.inProduction()) {
mix.version();
}