You've already forked lubo_comment_query
支持cdn文件上传至s3
This commit is contained in:
@ -1,5 +1,21 @@
|
||||
const mix = require('laravel-mix');
|
||||
const S3PusherPlugin = require('webpack-s3-pusher');
|
||||
require('laravel-mix-versionhash');
|
||||
|
||||
if (mix.inProduction()) {
|
||||
mix.webpackConfig({
|
||||
plugins: [
|
||||
new S3PusherPlugin({
|
||||
key: process.env.AWS_ACCESS_KEY_ID,
|
||||
secret: process.env.AWS_SECRET_ACCESS_KEY,
|
||||
bucket: "cdn",
|
||||
region: process.env.AWS_DEFAULT_REGION,
|
||||
endpoint: process.env.AWS_ENDPOINT,
|
||||
prefix: 'lubo',
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mix Asset Management
|
||||
@ -22,7 +38,7 @@ mix
|
||||
])
|
||||
.disableNotifications();
|
||||
if (mix.inProduction()) {
|
||||
mix.version();
|
||||
mix.versionHash();
|
||||
} else {
|
||||
mix.sourceMaps()
|
||||
}
|
||||
|
Reference in New Issue
Block a user