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
Currently, the CLI's LSPAssetsPlugin plugin only allows users to specify a file path to load XLRs into the LSP. This requires some unfriendly initialization of the plugin when passing XLR enabled packages as you would need to do something like the below to initialize it:
Given that the entrypoint for each module can be different, the added effort of finding how many levels to go up from the entrypoint to get to the xlr folder in the module may require some trial and error.
Proposed Solution
If we embrace subpath exports (which are supported back through node 14) to allow the manifest.js file in the generated XLR folder to be accessed via a subpath, the package author can easily expose the XLR location and the integration author can access it in a standard way without having to know how the original package is setup. Example:
Problem
Currently, the CLI's
LSPAssetsPlugin
plugin only allows users to specify a file path to load XLRs into the LSP. This requires some unfriendly initialization of the plugin when passing XLR enabled packages as you would need to do something like the below to initialize it:Given that the entrypoint for each module can be different, the added effort of finding how many levels to go up from the entrypoint to get to the
xlr
folder in the module may require some trial and error.Proposed Solution
If we embrace subpath exports (which are supported back through node 14) to allow the
manifest.js
file in the generated XLR folder to be accessed via a subpath, the package author can easily expose the XLR location and the integration author can access it in a standard way without having to know how the original package is setup. Example:In the XLR enabled library's
package.json
In the CLI Preset of the integrating application
Work to Do
The text was updated successfully, but these errors were encountered: