【问题标题】:create-react-app yarn build is shipping my source codes into build directorycreate-react-app yarn build 将我的源代码发送到 build 目录
【发布时间】:2019-04-20 19:54:05
【问题描述】:

似乎当我在 create-react-app 创建的项目上运行 yarn build 时,chunk.js 文件将包含我的原始源代码,人们可以简单地在 chrome 的 devtools 中以漂亮的格式查看我的代码逻辑。我错过了什么吗?例如看看我有这个测试网站:https://alisalimi25.github.io/

【问题讨论】:

    标签: build create-react-app yarnpkg production


    【解决方案1】:

    按照this documentation,您应该在根位置创建一个名为“.env”的文件,然后将“GENERATE_SOURCEMAP=false”添加到该文件中。

    希望对你有用!

    【讨论】:

      猜你喜欢
      • 2021-07-03
      • 1970-01-01
      • 2020-07-15
      • 2017-01-18
      • 2018-01-21
      • 1970-01-01
      • 2017-10-05
      • 1970-01-01
      • 2018-06-09
      相关资源
      最近更新 更多