Closed farwayer closed 3 months ago
try add resolve in metro.config.js file
const config = {
resolver: {
extraNodeModules: {
stream: require.resolve('stream-browserify'),
@theprashant-one just added the hack to remove the sequence that causes the problem in my case
diff --git a/lib/plugin/index.js b/lib/plugin/index.js
const createContent = (js) => {
+ js = js.replace('return`\\`${t}\\``', 'return')
js = js.replace(/([`$])/g, '\\$1');
return "export default String.raw`\n"+wrapByHtml(js)+"\n`.replace(/\\\\([`$])/g, '\\$1')";
};
Describe the bug
Transformation failed in some cases with the error
To Reproduce
Platform:
Additional context
Look like the issue is inside
createContent()
while processing react bundle