Closed JinZhang-96 closed 1 year ago
For example, if commonjs dynamically imports files such as require ('../a/b'+value+'. png'), the above error will be reported。
code position: 424 line at index.js
const example = "For example: import(./foo/${bar}.js)."; function sanitizeString(str) { if(typeof str !== undefined){ str = str+"" } if (str.includes("")) { throw new Error("A dynamic import cannot contain characters."); } return str; }
./foo/${bar}.js
Can you provide a minimal reproduction repo?
For example, if commonjs dynamically imports files such as require ('../a/b'+value+'. png'), the above error will be reported。
code position: 424 line at index.js
const example = "For example: import(
./foo/${bar}.js
)."; function sanitizeString(str) { if(typeof str !== undefined){ str = str+"" } if (str.includes("")) { throw new Error("A dynamic import cannot contain characters."); } return str; }