/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/custom-json-modules/webpack.config.js
37 строк
552 B
Alexander Akait
refactor: examples (#20085)
04 ноя 2025, 18:22
Не верифицирован
04 ноя 2025, 18:22
196e19e
Код
Авторство
О чём код?
"use strict"; const json5 = require("json5"); const toml = require("toml"); // @ts-expect-error no types for yamljs const yaml = require("yamljs"); /** @type {import("webpack").Configuration} */ const config = { module: { rules: [ { test: /\.toml$/, type: "json", parser: { parse: toml.parse } }, { test: /\.json5$/, type: "json", parser: { parse: json5.parse } }, { test: /\.yaml$/, type: "json", parser: { parse: yaml.parse } } ] } }; module.exports = config;