Skip to content

Commit

Permalink
[OGT-123] Set reverse proxy sub-path required for generated links to …
Browse files Browse the repository at this point in the history
…resources.
  • Loading branch information
innc committed Apr 14, 2022
1 parent 39c3ab3 commit c41825a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ const mix = require('laravel-mix');
/* required for Leaflet layer control icon */
mix.setResourceRoot(process.env.ASSET_URL ?? '');

/* set reverse proxy sub-path required for generated links to resources */
if (['production', 'testing'].includes(process.env.APP_ENV)) {
mix.webpackConfig({
output: {
publicPath: process.env.MIX_PROXY_PATH + '/',
},
});
}

mix.js('resources/js/app.js', 'public/js')
.vue()
.postCss('resources/css/app.css', 'public/css', [
Expand Down

0 comments on commit c41825a

Please sign in to comment.