haystack/docs-website/plugins/txtLoaderPlugin.js
2025-11-19 11:25:30 +01:00

22 lines
441 B
JavaScript

export default function txtLoaderPlugin() {
return {
name: 'txt-loader-plugin',
/**
* Ensure Webpack can handle plain `.txt` files like `llms.txt` without
* trying to parse them as JavaScript.
*/
configureWebpack() {
return {
module: {
rules: [
{
test: /\.txt$/i,
type: 'asset/source',
},
],
},
};
},
};
}