diff --git a/ember-scoped-css/src/lib/path/template-transform-paths.js b/ember-scoped-css/src/lib/path/template-transform-paths.js index 45c07875..af1da015 100644 --- a/ember-scoped-css/src/lib/path/template-transform-paths.js +++ b/ember-scoped-css/src/lib/path/template-transform-paths.js @@ -1,8 +1,6 @@ import path from 'node:path'; -import { existsSync } from 'fs'; - -import { findWorkspacePath, withoutExtension } from './utils'; +import { findWorkspacePath } from './utils'; /** * template plugins do not hand us the correct file path. @@ -36,7 +34,10 @@ export function fixFilename(filename) { * - the filename looks like an absolute path, but swapped out the 'app' part of the path * with the module name, so the file paths never exist on disk */ - if (!fileName.includes('/app/') && !fileName.includes('/node_modules/.embroider/')) { + if ( + !fileName.includes('/app/') && + !fileName.includes('/node_modules/.embroider/') + ) { let maybeModule = fileName.replace(workspace, ''); let [maybeScope, ...rest] = maybeModule.split('/').filter(Boolean); let parts = rest; diff --git a/ember-scoped-css/src/lib/path/template-transform-paths.test.ts b/ember-scoped-css/src/lib/path/template-transform-paths.test.ts index 791612e4..372331de 100644 --- a/ember-scoped-css/src/lib/path/template-transform-paths.test.ts +++ b/ember-scoped-css/src/lib/path/template-transform-paths.test.ts @@ -54,7 +54,10 @@ describe('fixFilename()', () => { let corrected = fixFilename(file); expect(corrected).to.equal( - path.join(paths.embroiderApp, 'app/components/app/page/template-only.hbs'), + path.join( + paths.embroiderApp, + 'app/components/app/page/template-only.hbs', + ), ); });