/
githubmirror
/
immutable-js
Обзор
Документация
Войти
/
githubmirror
/
immutable-js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
resources/jestResolver.js
17 строк
597 B
Julien Deniau
Better comments, and tests cases thanks to @acusti
30 июн 2021, 10:37
30 июн 2021, 10:37
2b46195
Код
Авторство
О чём код?
const path = require('path'); const pkg = require('../package.json'); module.exports = (request, options) => { if (request === 'immutable') { if (process.env.CI) { // In CI environment, test the real built file to be sure that the build is not broken return path.resolve(options.rootDir, pkg.main); } // In development mode, we want sourcemaps, live reload, etc., so point to the src/ directory return `${options.rootDir}/src/Immutable.js`; } // Call the defaultResolver, if we want to load non-immutable return options.defaultResolver(request, options); };