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
Hi, I'm trying to get compiled different versions depending on some runtime values and I found this plugin very usefull, but I think I have found a bug.
When using this plugin on several webpack config objects, the output bundles always match the first of the passed objects.
For example this config object was always creating bundles matching the first of the objects in the array (page1):
After debugging a little the code of the loader, I found that in the index.js file, the options variable is defined outside of the exported function, it's always taking the value of the first call done to it, and not taking the passed config on succesive executions. This gets solved by removing the if on line #7.
Hope you find this useful.
Cheers!
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to get compiled different versions depending on some runtime values and I found this plugin very usefull, but I think I have found a bug.
When using this plugin on several webpack config objects, the output bundles always match the first of the passed objects.
For example this config object was always creating bundles matching the first of the objects in the array (page1):
After debugging a little the code of the loader, I found that in the index.js file, the options variable is defined outside of the exported function, it's always taking the value of the first call done to it, and not taking the passed config on succesive executions. This gets solved by removing the if on line #7.
Hope you find this useful.
Cheers!
The text was updated successfully, but these errors were encountered: