Skip to content

Commit

Permalink
Fix inline plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
robisim74 committed Nov 4, 2022
1 parent d03f25e commit b453e8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/inline/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function qwikSpeakInline(options: QwikSpeakInlineOptions): Plugin {
*/
async transform(code: string, id: string) {
// Filter id
if (id.includes('/src') && id.endsWith('.js')) {
if (/\/src\//.test(id) && /\.(js|cjs|mjs|jsx|ts|tsx)$/.test(id)) {
// Filter code
if (/\$translate/.test(code)) {
return inline(code, translation, resolvedOptions);
Expand Down

0 comments on commit b453e8e

Please sign in to comment.