-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outros undefined
when including svelte libraries
#5
Comments
I did a repo which shows the bug happening (at least on my computer). https://github.com/JoshuaCrewe/svelte-outros-bug The webpack.mix.js on this one is super minimal so it should rule out what I was doing in the more complicated app one. I would like to say that this means the error is either with Laravel Mix or with this extension ?! I am going to make a coffee now. |
I also set up the same code using the webpack template from Sveltejs and I do not get the error using that build process. Sorry for the spam comments. |
Hey @JoshuaCrewe, actually I am interested if we missed something while doing the webpack template and sticking to the Svelte official webpack config is what we strive to do. Can you comment on what you would like added and I'll take a look sometime this week? We are also open to PRs. Kind regards, |
Hi @morpheus7CS, It has taken me a full day to work out that it is a comilation error and not an error in my code or with Svelte. I have been banging my head against a wall over it. Knowing that there is something to find is half the battle I suppose. One of the reasons I use Laravel Mix is becuase webpack is a pain to configure so I really don't know much about it. I was hoping you would know where to look. I do have plans to compare the webpack template and this extension to see if I can find where the issue is. I had a look at the source here but it was a bit beyond me. What I am really struggling with is connecting what the error in the browser console is, with the compilation steps. If I get anywhere I will open a PR for sure. Any insight greatly appreciated on this one though. Thanks for the response! |
It is this :
If I add this in my reduced case scenario then it works in Laravel Mix land. I remember going down this route from one of the other issues I found but the mainFields array didn't have all those options in it so other things broke. I must have misunderstood what I was doing. While this would work as extra config in webpack.mix.js I think it might be neat if it was taken care of in this extension if there are no side effects. I will have a look at a PR. |
@morpheus7CS I am having trouble coming up with a PR becuase I am having trouble linking this module in a project. I thought I could clone my fork, Do you have any tips for developing this module ? |
Nicely done @JoshuaCrewe! Thanks for contributing. Kind regards, |
I am not sure if this is where the source of the issue lies, or if it is with Laravel Mix or Svelte or somewhere else.
I think it might be related to this svelte issue or perhaps this one.
I have a REPL which works fine
https://svelte.dev/repl/d4d0fe54528644b2b5d47f62c2535389?version=3.20.1
If I use that same code in my app which uses laravel mix and this mix extension I get an error.
TypeError: outros is undefined
To be clear :
Using Laravel Mix Svelte I get the above error after step 5.
For completeness this is my
webpack.mix.js
I have been trying to figure out where this error has come from for a while so now I am casting wide for an answer.
The text was updated successfully, but these errors were encountered: