Skip to content

Commit

Permalink
add macros plugins with default config rather than no plugins at all
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Sep 11, 2024
1 parent 94a010f commit e87b0f9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/compat/src/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { join } from 'path';
import type { Transform } from 'babel-plugin-ember-template-compilation';
import type { Options as ResolverTransformOptions } from './resolver-transform';
import type { Options as AdjustImportsOptions } from './babel-plugin-adjust-imports';
import MacrosConfig from '@embroider/macros/src/macros-config';

export interface CompatBabelState {
plugins: PluginItem[];
Expand All @@ -24,11 +25,15 @@ function loadCompatConfig(): CompatBabelState {
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require(compatFile);
}
let macros = MacrosConfig.for({}, process.cwd());
let { plugins: templateMacros, setConfig } = MacrosConfig.transforms();
setConfig(macros);
macros.finalize();
return {
plugins: [],
templateTransforms: [],
babelMacros: [],
templateMacros: [],
babelMacros: macros.babelPluginConfig(),
templateMacros: templateMacros as any,
};
}

Expand Down

0 comments on commit e87b0f9

Please sign in to comment.