1oNflow
V2EX  ›  问与答

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

  •  
  •   1oNflow · Aug 20, 2019 · 1079 views
    This topic created in 2573 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   ·   Privacy   ·   Solana   ·   986 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 19:01 · PVG 03:01 · LAX 12:01 · JFK 15:01
    ♥ Do have faith in what you're doing.