webpack/test/configCases/json/top-level-json-parser/webpack.config.js

25 lines
357 B
JavaScript

const toml = require("toml");
/** @type {import("../../../../").Configuration[]} */
module.exports = [
{
mode: "development",
module: {
parser: {
json: {
parse(input) {
expect(arguments.length).toBe(1);
return toml.parse(input);
}
}
},
rules: [
{
test: /\.toml$/,
type: "json"
}
]
}
}
];