2025-07-02 20:10:54 +08:00
|
|
|
"use strict";
|
|
|
|
|
2019-11-29 01:49:53 +08:00
|
|
|
const json5 = require("json5");
|
2025-07-03 17:06:45 +08:00
|
|
|
const toml = require("toml");
|
2019-11-29 01:49:53 +08:00
|
|
|
const yaml = require("yamljs");
|
2019-11-29 01:12:11 +08:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.toml$/,
|
|
|
|
type: "json",
|
|
|
|
parser: {
|
2019-11-30 03:26:12 +08:00
|
|
|
parse: toml.parse
|
2019-11-29 01:12:11 +08:00
|
|
|
}
|
2019-11-29 01:39:35 +08:00
|
|
|
},
|
|
|
|
{
|
2019-11-29 23:15:04 +08:00
|
|
|
test: /\.json5$/,
|
2019-11-29 01:39:35 +08:00
|
|
|
type: "json",
|
|
|
|
parser: {
|
2019-11-30 03:26:12 +08:00
|
|
|
parse: json5.parse
|
2019-11-29 01:39:35 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.yaml$/,
|
|
|
|
type: "json",
|
|
|
|
parser: {
|
2019-11-30 03:26:12 +08:00
|
|
|
parse: yaml.parse
|
2019-11-29 01:39:35 +08:00
|
|
|
}
|
2019-11-29 01:12:11 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
};
|