Skip to content

Commit

Permalink
fix extra define.amd
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Apr 15, 2022
1 parent da8fd7f commit 0796a64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/next/taskfile.js
Expand Up @@ -196,7 +196,13 @@ export async function ncc_next__react_dev_overlay(task, opts) {
fs.writeFileSync(
clientFile,
content.replace(
'if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){r.platform=v;define((function(){return v}))}else ',
new RegExp(
'if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){r.platform=b;define((function(){return b}))}else '.replace(
/[|\\{}()[\]^$+*?.-]/g,
'\\$&'
),
'g'
),
''
)
)
Expand Down

0 comments on commit 0796a64

Please sign in to comment.