From 313d4783e95d1dcaa24921d9c60cf12c3451dc71 Mon Sep 17 00:00:00 2001 From: patrickpircher Date: Fri, 1 Mar 2024 11:07:15 +0100 Subject: [PATCH] fix embroider namespacing --- lib/hbs-imports-babel-plugin.ts | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hbs-imports-babel-plugin.ts b/lib/hbs-imports-babel-plugin.ts index e455e8f..a894a7c 100644 --- a/lib/hbs-imports-babel-plugin.ts +++ b/lib/hbs-imports-babel-plugin.ts @@ -24,9 +24,9 @@ module.exports = function hbsImports({ types: t }: { types: BabelTypes}) { // @ts-ignore const fileName = path.hub.file.opts.filename; if (!fileName) return; - if (fileName.includes('embroider')) { + if (fileName.includes('.embroider')) { const parts = fileName.split('/'); - const index = parts.indexOf('embroider'); + const index = parts.indexOf('.embroider'); cwd = parts.slice(0, index + 2).join('/'); } ImportProcessor.options.root = cwd; diff --git a/package.json b/package.json index c3120e5..b6f509b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-hbs-imports", - "version": "1.0.0", + "version": "1.0.1", "repository": { "type": "git", "url": "https://github.com/patricklx/ember-hbs-imports"