Open gloriaJun opened 2 years ago
new webpack.NormalModuleReplacementPlugin(/\.\/config-APPLICATION_PHASE/, `./config-${config.build.phase}`),
╰─❯ ls -al src/config total 64 drwxr-xr-x 10 user staff 320 1 14 11:24 . drwxr-xr-x 18 user staff 576 1 4 21:01 .. -rw-r--r-- 1 user staff 503 1 14 11:33 config-APPLICATION_PHASE.ts -rw-r--r-- 1 user staff 981 1 14 11:24 config-BETA.js -rw-r--r-- 1 user staff 220 1 14 11:24 config-LOCAL.js -rw-r--r-- 1 user staff 830 1 14 11:24 config-REAL.js -rw-r--r-- 1 user staff 209 1 14 11:24 index.ts
to read phaseConfig on jest env
// jest.config.js moduleNameMapper: { // ...SKIP... '^./config-APPLICATION_PHASE$': '<rootDir>/src/config/config-BETA', },
webpack.config.js
config dir
jest.config.js
to read phaseConfig on jest env