webpack OSS All In One

阿里云 OSS

对象存储(Object Storage Service,简称OSS),是阿里云对外提供的海量、安全和高可靠的云存储服务

https://cn.aliyun.com/product/oss

Sentry SourceMap & 401 bug

https://github.com/getsentry/sentry/issues?q=sourcemap

https://github.com/getsentry/sentry/issues?q=sourcemap+401

ERROR in Sentry CLI Plugin: Command failed: /Users/xgqfrms/Documents/gitlab-projects/vue-web-app/node_modules/@sentry/cli/sentry-cli releases new cbb76f651b4ee0f76da3aaf98b848ff8ef29409a
error: API request failed
caused by: sentry reported an error: Invalid token (http status: 401) Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports. error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

issues

https://github.com/getsentry/sentry/issues/20916

https://forum.sentry.io/t/offline-sourcemaps-not-used/548/3

https://github.com/getsentry/sentry/issues/10136

https://github.com/getsentry/sentry-webpack-plugin/issues/90

Uploading Source Maps

https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/

https://docs.sentry.io/product/cli/releases/

Sentry

安装 webpack-plugin(假设我们用的 webpack 作为编译工具,或者其他基于 webpack 的编译工具如 umi)

$ npm install @sentry/webpack-plugin --save-dev

增加 webpack配置,调用 sentry插件(这里我们用的 umi 配置)


import SentryWebpackPlugin from '@sentry/webpack-plugin'; {
// ...
// 开启source-map
devtool: 'source-map',
oss: {
ignore: {
// 不上传map文件
extname: ['.map'],
},
},
chainWebpack(config) {
// ...
config.plugin('sentry').use(SentryWebpackPlugin, [
{
// release名称(项目名+@+版本号)
release: `react-web-app@${pkg.version}`,
// 编译后静态文件的输出文件夹
include: '../server/app/public',
// 静态文件的cdn地址
urlPrefix: `https://cdn.xgqfrms.xyz/static/${pkg.version}`,
// 上传release时覆盖之前的
rewrite: true,
},
]);
},
// ...
}

webpack 自动上传静态资源到 OSS

https://juejin.cn/post/6844903809760624654

https://www.npmjs.com/package/webpack-aliyun-oss

https://www.npmjs.com/package/webpack-oss

https://github.com/gp5251/webpack-aliyun-oss

https://github.com/staven630/webpack-oss

refs



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


最新文章

  1. HTML5将图片转化成字符画
  2. 让Team Foundation Server/TFS自动记住用户名密码解决方案
  3. 源码安装Redis
  4. DSP using MATLAB 示例Example3.7
  5. LeetCode OJ 274. H-Index
  6. 线程本地存储TLS(Thread Local Storage)的原理和实现——分类和原理
  7. BZOJ 1045 糖果传递
  8. 关于angularJS与jquery在使用上的一些感悟
  9. 如何取消FLEX里模态窗口的毛玻璃效果
  10. AppScan安全问题解决方案
  11. SpringMVC控制器接收不了PUT提交的参数的解决方案
  12. Unity 触屏缩放模型
  13. 在verilog中关于inout口的设计方法
  14. 使用国内源解决Qt在线更新慢的问题
  15. WorkFlow介绍及用法
  16. 博客测试:博客系统i94web beta1.0 申请测试
  17. Hbase单机安装部署
  18. js javascript 简易随机值穿插加解密【原】
  19. P5245 【模板】多项式快速幂
  20. 100-days: twenty-two

热门文章

  1. 使用Azure Runbook 发送消息到Azure Storage Queue
  2. 命名秘籍周获近五千星——GitHub 热点速览 v.21.04
  3. ArchLinux安装后所需要的环境和工具
  4. Lua大量字符串拼接方式效率对比及原因分析
  5. java画海报二维码
  6. 为什么Redis集群要使用反向代理?
  7. Prometheus为你的SpringBoot应用保驾护航
  8. Java服务端性能优化
  9. zabbix添加持续告警
  10. HDU 6900 Residual Polynomial【分治 NTT】