-
Notifications
You must be signed in to change notification settings - Fork 59
/
webpack.mix.js
34 lines (30 loc) · 973 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
const mix = require("laravel-mix");
require("laravel-mix-merge-manifest");
if (mix.inProduction()) {
var publicPath = "publishable/assets";
} else {
var publicPath = "../../../public/themes/pwa/default/build/assets";
}
mix.setPublicPath(publicPath).mergeManifest();
mix.disableNotifications();
mix.js(path.resolve("src/Resources/assets/js/app.js"), "js/app.js")
.webpackConfig({
resolve: {
alias: {
"@": path.resolve("src/Resources/assets/sass"),
},
},
})
.copy(path.resolve("src/Resources/assets/images"), publicPath + "/images")
.copy(path.resolve("src/Resources/assets/firebase"), "../../../public/")
.sass(
__dirname + "/src/Resources/assets/sass/admin.scss",
"css/pwa-admin.css",
)
.sass(path.resolve("src/Resources/assets/sass/app.scss"), "css/pwa.css")
.options({
processCssUrls: false,
});
if (mix.inProduction()) {
mix.version();
}