/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/source-map/extract-source-map2/index.js
11 строк
415 B
Xiao
feat: add `extractSourceMap` option to implement the capabilities of loading source maps by comment
27 авг 2025, 18:53
Не верифицирован
27 авг 2025, 18:53
64ce283
Код
Авторство
О чём код?
const fs = require("fs"); const path = require("path"); require("./a"); it("should extract source map", () => { const fileData = fs.readFileSync(path.resolve(__dirname, "bundle0.js.map")).toString("utf-8"); const { sources, sourcesContent } = JSON.parse(fileData); expect(sources.includes("webpack:///./external-source-map.txt")).toBe(true); expect(sourcesContent.map(s => s.trim())).toContain("source"); });