Skip to content

Commit

Permalink
feat: support more ext
Browse files Browse the repository at this point in the history
  • Loading branch information
callqh committed Jun 25, 2024
1 parent fe4511e commit 0dab0f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pnpm install -D @jstors/farm-plugin-yaml

export default defineConfig({
plugins: [
'farm-plugin-yaml',
'@jstors/farm-plugin-yaml',
]
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jstors/farm-plugin-yaml",
"version": "0.0.2",
"version": "0.0.3",
"main": "scripts/index.js",
"types": "scripts/index.d.ts",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Plugin for FarmPluginYaml {
_context: &std::sync::Arc<farmfe_core::context::CompilationContext>,
_hook_context: &farmfe_core::plugin::PluginHookContext,
) -> farmfe_core::error::Result<Option<farmfe_core::plugin::PluginLoadHookResult>> {
if param.resolved_path.ends_with(".yaml") {
if param.resolved_path.ends_with(".yaml") || param.resolved_path.ends_with(".yml") {
return Ok(Some(PluginLoadHookResult {
content: fs::read_file_utf8(param.resolved_path)?,
module_type: ModuleType::Custom("yaml".to_string()),
Expand Down

0 comments on commit 0dab0f0

Please sign in to comment.