forked from remp2020/remp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
35 lines (34 loc) · 1.21 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
let mix = require('laravel-mix').webpackConfig({
watchOptions: {
ignored: /node_modules/,
}
}).version();
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: "/assets/lib/"
})
.js("resources/assets/js/banner.js", "js/banner.js")
.js("resources/assets/js/remplib.js", "js/remplib.js")
.js("resources/assets/js/bannerSelector.js", "js/bannerSelector.js")
} else {
mix
.options({
publicPath: "public/assets/vendor/",
resourceRoot: "/assets/vendor/"
})
.js("resources/assets/js/app.js", "js/app.js")
.js("resources/assets/js/banner.js", "js/banner.js")
.sass("resources/assets/sass/vendor.scss", "css/vendor.css")
.sass("resources/assets/sass/app.scss", "css/app.css")
.extract()
.autoload({
"jquery": ['$', 'jQuery'],
"node-waves": ["Waves"],
"autosize": ["autosize"],
"vue": ["Vue"],
"moment": ["Moment"]
});
}