universal-vue / uvue

Vue CLI plugin to create universal Vue applications with ease
https://universal-vue.github.io/docs/
MIT License
127 stars 13 forks source link

Removed circular dependencie in uvue loader #38

Closed AliLozano closed 5 years ago

AliLozano commented 5 years ago

What kind of change does this PR introduce?

Refactor to avoid circular dependence. More detail #37

What is the current behavior? Create circular dependencie in UvueLoader

What is the new behavior? Use a ApiUtil.js to avoid to have a reference to the api from uvue loader.

Checklist:

// I don't know how to create a test for this, is a first time that I modify a webpack plugin, but basically it can be tested with JSON.stringify(api);

yabab-dev commented 5 years ago

Sorry but I dont this the link between your changes and a JSON.stringify(api). There is no place where I call this code in UVue...

AliLozano commented 5 years ago

I mean that the webpack plugins must be serializable, I can't find the documentation, but as I mention in the issue, the typescript plugin serializes the next plugins with JSON.stringify, and currently this plugin is not serializable.

yabab-dev commented 5 years ago

If you can provide any mention that webpack needs serializable plugins, I'll take it

yabab-dev commented 5 years ago

https://github.com/universal-vue/uvue/issues/37#issuecomment-525470292