Skip to content

Commit

Permalink
make sure @embroider/macros doesn't try to load a babel config
Browse files Browse the repository at this point in the history
this was causing some issues for us in the vite work because we now have a real babel config. This could have caused a bunch of other bugs that this really shouldn't be using
  • Loading branch information
mansona committed Mar 7, 2024
1 parent 7e05475 commit f41229b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/macros/src/babel/evaluate-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ export function buildLiterals(
if (typeof value === 'undefined') {
return babelContext.types.identifier('undefined');
}
let statement = babelContext.parse(`a(${JSON.stringify(value)})`) as t.File;
let statement = babelContext.parse(`a(${JSON.stringify(value)})`, { configFile: false }) as t.File;
let expression = (statement.program.body[0] as t.ExpressionStatement).expression as t.CallExpression;
return expression.arguments[0] as t.ObjectExpression;
}

0 comments on commit f41229b

Please sign in to comment.