Commit 617647a9 authored by 张冬's avatar 张冬

2

parent 214d6a9b
......@@ -46,28 +46,28 @@ module.exports = {
}),
new InsertScriptPlugin({ files: modules })
]
<!-- const webpackAliyunOss = [
new WebpackAliyunOss({
// from: './dist/**', // 上传那个文件或文件夹 可以是字符串或数组
// dist: 'web_admin/', // 需要上传到oss上的给定文件目录
// region: 'oss-cn-shenzhen',
// bucket: 'ppy-prod-webadmin',
// test: true,
setOssPath: (filePath) => {
// some operations to filePath
const index = filePath.lastIndexOf('dist')
const Path = filePath.substring(index + 4, filePath.length)
return Path.replace(/\/g, '/')
},
setHeaders: (filePath) => {
// some operations to filePath
// return false to use default header
return {
'Cache-Control': 'max-age=31536000'
}
}
})
] -->
// const webpackAliyunOss = [
// new WebpackAliyunOss({
// // from: './dist/**', // 上传那个文件或文件夹 可以是字符串或数组
// // dist: 'web_admin/', // 需要上传到oss上的给定文件目录
// // region: 'oss-cn-shenzhen',
// // bucket: 'ppy-prod-webadmin',
// // test: true,
// setOssPath: (filePath) => {
// // some operations to filePath
// const index = filePath.lastIndexOf('dist')
// const Path = filePath.substring(index + 4, filePath.length)
// return Path.replace(/\/g, '/')
// },
// setHeaders: (filePath) => {
// // some operations to filePath
// // return false to use default header
// return {
// 'Cache-Control': 'max-age=31536000'
// }
// }
// })
// ]
if (NODE_ENV === 'production') {
config.plugins = [...webpackAliyunOss, ...config.plugins]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment