mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-28 17:03:59 +00:00
Laravel Vapor - attempt to fix a missing asset (Error 403)
This commit is contained in:
Vendored
+5
-1
@@ -16,6 +16,9 @@ const onError = (error) => {
|
||||
|
||||
const sassOptions = {style: 'compressed'};
|
||||
|
||||
//cief todo: gulp
|
||||
const ASSET_URL = process.env.ASSET_URL;
|
||||
|
||||
gulp.task('vendorJs', () => {
|
||||
|
||||
fancyLog('Compiling vendor JS dependencies');
|
||||
@@ -37,6 +40,7 @@ gulp.task('vendorCss', () => {
|
||||
.pipe(plugins.cleanCss())
|
||||
.pipe(plugins.replace('../../../font-awesome/', './'))
|
||||
.pipe(plugins.replace('../../jquery-ui-dist/', ''))
|
||||
.pipe(plugins.replace(/background-image:url\(\.\.\/\.\.\//g, `background-image:url(${ASSET_URL}`)) //cief todo: gulp
|
||||
.pipe(gulp.dest(pkg.paths.build.css));
|
||||
});
|
||||
|
||||
@@ -115,4 +119,4 @@ gulp.task('watch', (done) => {
|
||||
gulp.watch(pkg.globs.sourceJs, gulp.series('sourceJs'));
|
||||
gulp.watch(pkg.globs.sourceJs, gulp.series('sourceFonts'));
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
+18
@@ -12,3 +12,21 @@ const mix = require('laravel-mix');
|
||||
*/
|
||||
|
||||
mix.js('./resources/assets/vue/app.js', 'public/vue').version();
|
||||
|
||||
//cief todo: gulp
|
||||
// if (mix.inProduction()) {
|
||||
const ASSET_URL = process.env.ASSET_URL;
|
||||
|
||||
mix.webpackConfig(webpack => {
|
||||
return {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.ASSET_PATH": JSON.stringify(ASSET_URL)
|
||||
})
|
||||
],
|
||||
output: {
|
||||
publicPath: ASSET_URL
|
||||
}
|
||||
};
|
||||
});
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user