1oNflow
V2EX  ›  问与答

Jest 如何测试使用 Create React App 创建的项目中 Webpack 的 require.context 函数?

  •  
  •   1oNflow · Aug 20, 2019 · 1009 views
    This topic created in 2503 days ago, the information mentioned may be changed or developed.

    在 stackoverflow 看到有推荐使用babel-plugin-require-context-hook这个插件,但是启用它要修改.babelrc,Create React App 生成的项目似乎不能自定义 babel 设定(除非 eject ),这种情况下该怎么测试呢?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2754 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 09:52 · PVG 17:52 · LAX 02:52 · JFK 05:52
    ♥ Do have faith in what you're doing.