You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have an option to exclude e.g. node_modules/**/test to be included/parsed.
PoC:
// Now traverse the AST and generate modified source
if (!file.includes("node_modules/")) {
const ast = babelParser.parse(originalSource, { sourceFilename: file, sourceType: 'unambiguous' });
traverse(ast, HyperloopVisitor);
}
makes it build again. Of course it should be a config option and not just the fixed node_modules folder. We could open .babelrc because that can contain:
{
"ignore": [
"**/node_modules/**/test"
]
}
check the app folder if the file is there, then read the ignore node and the content.
Test
create an app
include hyperloop
inside app/lib run npm i has-symbols
build the app
it should fail with "'return' outside of function"
The text was updated successfully, but these errors were encountered:
My current workaround is to remove the test/ folder from that node_module and it will build again. Patching hyperloop works too but I didn't want to do it on all machines :-)
The hooks in:
https://github.com/tidev/hyperloop.next/blob/master/android/hooks/tasks/scan-references-task.js#L301
https://github.com/tidev/hyperloop.next/blob/master/iphone/hooks/hyperloop.js#L587
include all files and tries to babel parse them. Depending on your files it will also include node_modules folders that you don't want to have in there (e.g. inspect-js/has-symbols#1 produces an error).
It would be nice to have an option to exclude e.g.
node_modules/**/test
to be included/parsed.PoC:
makes it build again. Of course it should be a config option and not just the fixed node_modules folder. We could open
.babelrc
because that can contain:check the app folder if the file is there, then read the ignore node and the content.
Test
app/lib
runnpm i has-symbols
The text was updated successfully, but these errors were encountered: