-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathwebpack.mix.js
62 lines (58 loc) · 1.94 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const mix = require('laravel-mix');
mix.override((config) => {
delete config.watchOptions;
}).webpackConfig({
resolve: {
symlinks: false,
},
stats: {
children: true,
}
}).version();
require('laravel-mix-polyfill');
if (process.env.REMP_TARGET === 'iota') {
// we're not using mix.extract() due to issues with splitting of banner.js + vue.js; basically we need not to have manifest.js
mix
.options({
publicPath: "public/assets/iota/",
resourceRoot: "/vendor/remp/beam/assets/iota/",
postCss: [
require('autoprefixer'),
],
})
.js("vendor/remp/beam-module/resources/assets/js/iota.js", "js/iota.js")
.vue()
} else if (process.env.REMP_TARGET === 'lib') {
// we're not using mix.extract() due to issues with splitting of banner.js + vue.js; basically we need not to have manifest.js
mix
.options({
publicPath: "public/assets/lib/",
resourceRoot: "/vendor/remp/beam/assets/lib/",
postCss: [
require('autoprefixer'),
],
})
.js("vendor/remp/beam-module/resources/assets/js/remplib.js", "js/remplib.js")
.vue()
.polyfill({
enabled: true,
useBuiltIns: "usage",
targets: {"ie": 11},
debug: false,
});
} else {
mix
.options({
publicPath: "public/vendor/beam",
resourceRoot: "../",
postCss: [
require('autoprefixer'),
],
})
.js("vendor/remp/beam-module/resources/assets/js/app.js", "js/app.js")
.js("vendor/remp/beam-module/resources/assets/js/remplib.js", "js/remplib.js")
.sass("vendor/remp/beam-module/resources/assets/sass/vendor.scss", "css/vendor.css")
.sass("vendor/remp/beam-module/resources/assets/sass/app.scss", "css/app.css")
.vue()
.extract();
}