Bundled package breaks when used in PROD
I am working on a package which provides hooks and components to be used in a Solid app.
The package is build with Rollup (config in next comment). It’s well tested and all test are successful.
I linked that package in a Solid-Start app to test the behaviour.
Everything works fine as long as the app runs in DEV mode and all the hooks and components work as expected, but once I build then app and run it in PROD my package breaks:
In some scenarios the hooks return the wrong values and in some cases I get maximum call stack size exceeded error.
Which again does not happen in DEV with the same build!?
I then digged deeper and added a function from another package mine is based on and compared the behaviour to the original one on the same page: the original works fine, mine is broken.
So I guess there something wrong with my rollup config (but again why does it work in dev!?)
The original uses pridepack as the bundler.
The package is build with Rollup (config in next comment). It’s well tested and all test are successful.
I linked that package in a Solid-Start app to test the behaviour.
Everything works fine as long as the app runs in DEV mode and all the hooks and components work as expected, but once I build then app and run it in PROD my package breaks:
In some scenarios the hooks return the wrong values and in some cases I get maximum call stack size exceeded error.
Which again does not happen in DEV with the same build!?
I then digged deeper and added a function from another package mine is based on and compared the behaviour to the original one on the same page: the original works fine, mine is broken.
So I guess there something wrong with my rollup config (but again why does it work in dev!?)
The original uses pridepack as the bundler.
