Replies: 1 comment 1 reply
-
Any interest in putting a PR together?
…On Wed, Oct 6, 2021 at 1:31 PM Ryan Bates ***@***.***> wrote:
I can't find a good way to import a custom list of plugins using Webpack.
I saw #68 <#68> but I
don't think the solution presented there is ideal since it includes all
dependencies for each plugin.
It appears the main issue is each plugin imports a relative
../../tom_select file but that can't be found in dist.
I suggest removing the TomSelect.define clause from each plugin and
setting it in the bundled js. For example:
import TomSelect from './tom-select';TomSelect.define("caret_position", require('./plugins/caret_position/plugin'));TomSelect.define("dropdown_input", require('./plugins/dropdown_input/plugin'));
...
This removes the relative ../../tom_select dependency so we can import
them in a similar manner.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#222>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH6YRD3I5JLIUKAGVMS4NLUFSPYLANCNFSM5FPP7ZEA>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I can't find a good way to import a custom list of plugins using Webpack. I saw #68 but I don't think the solution presented there is ideal since it includes all dependencies for each plugin.
It appears the main issue is each plugin imports a relative
../../tom_select
file but that can't be found indist
.I suggest removing the
TomSelect.define
clause from each plugin and setting it in the bundled js. For example:This removes the relative
../../tom_select
dependency so we can import them in a similar manner.Beta Was this translation helpful? Give feedback.
All reactions