Skip to content

Commit

Permalink
change export regex to be more extensive
Browse files Browse the repository at this point in the history
  • Loading branch information
eltigerchino committed Jan 15, 2023
1 parent f934ade commit 1640957
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function migrate_scripts(content, is_error, moved) {
return '';
}

if (!is_error && /export/.test(contents)) {
if (!is_error && /export let [\w]+[^"`'\w\s]/.test(contents)) {
contents = `\n${indent}${error('Add data prop', TASKS.PAGE_DATA_PROP)}\n${contents}`;
// Possible TODO: migrate props to data.prop, or suggest $: ({propX, propY, ...} = data);
}
Expand Down

0 comments on commit 1640957

Please sign in to comment.