/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/cases/inner-graph/simple/index.js
24 строки
590 B
Tobias Koppers
disable used exports optimization in development to prevent unexpected changes to module
09 июл 2020, 09:46
09 июл 2020, 09:46
454bee5
Код
Авторство
О чём код?
import { exportUsed, export2Used, export3Used, export4Used, export5Used, export6Used } from "./inner"; import { f1, pureUsed, fWithDefault } from "./module"; it("export should be unused when only unused functions use it", () => { f1(); expect(pureUsed).toBe(42); expect(fWithDefault()).toBe(42); if (process.env.NODE_ENV === "production") { expect(exportUsed).toBe(false); expect(export2Used).toBe(true); expect(export3Used).toBe(true); expect(export4Used).toBe(true); expect(export5Used).toBe(true); expect(export6Used).toBe(true); } return import("./chunk"); });