/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/inline-exports/dev/index.js
24 строки
655 B
hai-x
feat: support `optimization.inlineExports` (#20973)
27 май 2026, 18:36
Не верифицирован
27 май 2026, 18:36
1ea4f72
Код
Авторство
О чём код?
const path = require("path"); const generated = /** @type {string} */ ( __non_webpack_require__("fs").readFileSync( path.resolve(__dirname, "constants.bundle0.js"), "utf-8" ) ); it("should have correct exports in development mode", async () => { await import(/* webpackChunkName: "constants" */ "../basic/constants").then( exports => { expect(exports.REMOVE_i).toBe(123456); expect(exports.REMOVE_s).toBe("remove"); } ); }); it("should keep the module for dynamic import", () => { const noInlinedModuleIds = ["../basic/constants.js"]; noInlinedModuleIds.forEach(m => { expect(generated.includes(`"${m}"\n(`)).toBe(true); }); });