Skip to content

Commit

Permalink
fix(codegen): use regex instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jonambas committed Apr 8, 2024
1 parent a1630a1 commit 0fa3b2a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ export const codegen = (

const cssFn = args.artifacts.find((a) => a.id === 'css-fn');
const index = args.artifacts.find((a) => a.id === 'css-index');
const indexFile = index?.files.find(
(f) => f.file.includes('index.mjs') || f.file.includes('index.js'),
);
const indexFile = index?.files.find((f) => f.file.match(/^index\.(mjs|js)/));
const indexDtsFile = index?.files.find((f) => f.file.includes('index.d.'));
const ext = indexFile?.file.split('.').at(-1);
const dtsExt = indexDtsFile?.file.split('.').at(-1);
Expand Down

0 comments on commit 0fa3b2a

Please sign in to comment.