Skip to content

Instantly share code, notes, and snippets.

@snachx
Last active June 20, 2019 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snachx/f99a46bea2a434603c2352e9d0016132 to your computer and use it in GitHub Desktop.
Save snachx/f99a46bea2a434603c2352e9d0016132 to your computer and use it in GitHub Desktop.
vue.config.js
const WebpackOssPlugin = require('webpack-oss')
module.exports = {
publicPath: '/app',
outputDir: 'app',
configureWebpack: {
plugins: [
new WebpackOssPlugin({
accessKeyId: "xxx",
accessKeySecret: "yyy",
region: "oss-cn-hangzhou",
bucket: "bucket",
prefix: "test", // "bucket/prefix/xxx.yyy"
exclude: [/.*\.html$/], // 或者 /.*\.html$/,排除.html文件的上传
format: "",
deleteAll: true,
local: true // 上传打包输出目录里的文件
})
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment