Alias for Library #700
-
Hi I am looking to use a locally developed library and simply aliasing to it so I can use in the client side code. I have attempted to simply adjust the webpack configuration as follows.
Then import in clientappEnhance and in script tags... however webpack still does not resolve to the above alias. Is there a better way for referencing built libraries or modifying config options to easily reference an external library or am I missing something in webpack's behavior? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
We are providing alias option in plugin API, so create a local plugin in your theme or config files, and set alias there. walinejs/waline docs can be an example. Edited: you can also set alias directly in config file. |
Beta Was this translation helpful? Give feedback.
-
Hey Mister Hope I have another question. What do you think the best way to handle dependencies that require access to Problem is in Toast.md I use a ToastExample component that imports 'boostrap-vue-3' and subsequently calls usetoast. For some reason when building, ssr will attempt to render pages and usetoast will load all of bootstrap-vue-3. Some components use bootstrap as a dependency which will attempt to use document and window variables resulting in
I have attempted to wrap these components in Client Only tags without success. |
Beta Was this translation helpful? Give feedback.
We are providing alias option in plugin API, so create a local plugin in your theme or config files, and set alias there.
walinejs/waline docs can be an example.
Edited: you can also set alias directly in config file.