1oNflow
V2EX  ›  问与答

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

  •  
  •   1oNflow · Aug 20, 2019 · 962 views
    This topic created in 2462 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   ·   1278 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 17:07 · PVG 01:07 · LAX 10:07 · JFK 13:07
    ♥ Do have faith in what you're doing.