Hi,
I noticed my Instruction Count jumps beyond 11M if I try to import a function and constants I wanted to reuse from another js file into run.js.
Is there a workaround for reusing existing functions?
Thanks!
Hi,
I noticed my Instruction Count jumps beyond 11M if I try to import a function and constants I wanted to reuse from another js file into run.js.
Is there a workaround for reusing existing functions?
Thanks!
We are doing the same thing, @navdeep, but we are not reaching the instruction count limit.
Is it possible to share what kind of functions or constants are you trying to import? Maybe it has to do with the implementation of those functions as opposed to the import statements.
It is a dummy code where I tried importing Test_Titles into my run.js
here is test_titles in my constants.js ( it has other functions as well)
export const TEST_TITLES = {
GENERAL: ‘General’,
CART_DETAILS: ‘Cart details’,
PRODUCT_DETAILS: ‘Product details’,
CUSTOMER_DETAILS: ‘Customer details’,
SHIPPING_DETAILS: ‘Shipping details’,
ADDRESS: ‘Address’,
TIME: ‘Time’,
};
Just a thought, in development, can you try removing all the functions and helper file and see the instructions?
If it’s less than 11M, keep on adding functions 1 by 1 and see which one is using up the instructions.
For output, just return the default empty output so that we can be sure that it’s the import that’s causing the problem.
What do you think?
I just added the import statement and it crossed 11M. I am thinking a dummy helper with just this constant and will try importing