Skip to content

Commit

Permalink
fix slice
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx authored Mar 22, 2024
1 parent 721a705 commit 28fe99b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/macros/src/babel/macros-babel-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function main(context: typeof Babel): unknown {
}
const obj = t.objectExpression(
entries.map(e => {
const key = e.split('.').slice(-1).join('.');
const key = e.split('.').slice(0, -1).join('.');
const id = t.callExpression(
state.importUtil.import(path, state.pathToOurAddon('es-compat2'), 'default', 'esc'),
[state.importUtil.import(path, join(resolvedPath, key).replace(/\\/g, '/'), '*')]
Expand Down

0 comments on commit 28fe99b

Please sign in to comment.