/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/asset-modules/keep-source-maps/loader.js
11 строк
506 B
alexander.akait
refactor: code
19 июн 2024, 19:33
19 июн 2024, 19:33
1e2e0ac
Код
Авторство
О чём код?
const fs = require("fs"); const path = require("path"); /** @type {import("../../../../").LoaderDefinition<{ f(): any }>} */ module.exports = function(_) { // return the would-be output from SASS without needing the compiler as a dependency const transformed = fs.readFileSync(path.join(__dirname, "data/asset.css"), { encoding: "utf8" }); const sourceMap = fs.readFileSync(path.join(__dirname, "data/asset.css.map"), { encoding: "utf8" }); this.callback(null, transformed, JSON.parse(sourceMap)); }