Skip to content
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

fix: assert the option exists before sending it to the compiler #87

Closed
wants to merge 1 commit into from
Closed

Conversation

cmizzi
Copy link

@cmizzi cmizzi commented Apr 29, 2019

Using https://github.com/JeffreyWay/laravel-mix, options like context were sent to the compiler : it must not

using JeffreyWay/laravel-mix, options like `context` were sent to the compiler : it must not
@Conduitry
Copy link
Member

There are other plugin options besides the ones given in that object - those are just default values I believe. And I don't think we want to be maintaining a list of valid options here as well as in the compiler. We should just be relying on the compiler to know what the valid options are, and projects like the above one need to not pass invalid options.

@Conduitry
Copy link
Member

The unit tests here are failing because we need to be able to pass css and generate options to the compiler, and they're not listed in pluginOptions and so are ignored.

I don't believe svelte-loader should be doing anything differently here - laravel-mix would need to be updated.

@Conduitry Conduitry closed this Apr 29, 2019
@cmizzi
Copy link
Author

cmizzi commented Apr 30, 2019

laravel-mix, and possibly others, uses https://webpack.js.org/plugins/loader-options-plugin/. This plugin is sending more options to every registered plugins, and failed for svelte/compiler. It cannot be removed from laravel-mix and is not working with svelte-loader because of context option.

@0gust1
Copy link

0gust1 commented May 15, 2019

The issue could be related to #89 (and #90). but lacks precisions about svelte compiler version and webpack version used.

@0gust1
Copy link

0gust1 commented May 18, 2019

@cmizzi As #90 is now merged, maybe you would want to try again ? Make sure you use the latest svlete-loader version (I don't know laravel-mix beside the fact that's a webpack wrapper).

@cmizzi
Copy link
Author

cmizzi commented May 18, 2019

I already suggested a fix on laravel-mix to solve this problem : laravel-mix/laravel-mix#2089, so I could check with the previous state of laravel-mix if the bug is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants