簡體   English   中英

構建中不存在源映射

[英]source maps are not present in the build

我正在使用https://github.com/react-boilerplate/react-boilerplate樣板進行反應項目,我必須集成哨兵以進行錯誤日志報告。

為此,我需要在哨兵上上傳源地圖進行調試。 我遵循的指南是https://docs.sentry.io/platforms/javascript/guides/react/config/sourcemaps/#webpack

我還使用哨兵https://github.com/getsentry/sentry-webpack-plugin的插件在我們創建構建時自動上傳源映射。

但是,當我使用npm run build為項目創建構建時,靜態/js 文件夾中沒有源 map。

As far as I have seen, build contains a static folder which contains which contains html, css, js folders and inside js folder we have chunks and source map files like xyz.js.map.

那么,我該如何解決這個問題?

我建議使用下面的命令來創建一個演示反應應用程序,而不是使用上面的樣板

npx create-react-app my-app
cd my-app
npm start

運行npm run build ,您應該如您所說在構建文件夾中獲得所需的文件。

參考: https://reactjs.org/docs/create-a-new-react-app.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM