-
Notifications
You must be signed in to change notification settings - Fork 2
Some module exports may break the build #6
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
Comments
I'm not sure that introducing such annotation comment is a good idea. |
I don't want to end up with a big list of files to exclude in the webpack configuration. But I agree it's not optimal, and it requires configuration on previous loaders to preserve comments... Best would be enhance the quality of components detection to make sure it only handle modules exporting a Vue component. Another workaround is to stick to some filenaming convention like "hello.component.js" and configure the loader to include only "*. component.js" files. |
Hmm, I think detecting a component is impossible because a component can be any plain object. That likely cause false positive and true negative. I'd rather decide directory/file name rules of component files to let the loader only be applied to components. It is clear enough for the users and they can control which files the loader should be used by themselves. |
I do agree. Let's close this pull request, but maybe the README should
follow this convention and explain why it's a good practice ?
Le 24 mars 2017 5:04 PM, "katashin" <[email protected]> a écrit :
… Hmm, I think detecting a component is impossible because a component can
be any plain object. That likely cause false positive and true negative.
I'd rather decide directory/file name rules of component files to let the
loader only be applied to components. It is clear enough for the users and
they can control which files the loader should be used by themselves.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHJvmaqIW3_WUQx_Ww9VfIeTc61VAjvks5ro-l3gaJpZM4Mlbys>
.
|
Yes, explaining about this in README is good idea. |
README is updated. |
For some reason, I need to create this dummy module ...
This is not a Vue component at all, but vue-hot-reload-loader consider it is, and it then throw an exception inside the vue-hot-loader-api.
We should provide a way to ignore some module.
Also, we should think about improving the detection of Vue components to avoid using this comment on every non-component modules. Do you have any idea to enhance Vue component module detection ?
The text was updated successfully, but these errors were encountered: