-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
using v-bind in css will have a problem in production env #3921
Comments
Yes, you are right, it works fine in dev and there be a problems only in production env.
I aslo think it's a vue-loader bug, so i should submit this issue to vue-loader?
At 2021-06-09 18:18:16, "edison" ***@***.***> wrote:
works fine in dev see :sfc demo
I think it's a vue-loader bug.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I did a test, The same code with vite works fine. |
I am sorry, i forgot to submit the build tool. |
The root cause is: And so the generated name of but in the vue-loader code base, it also works fine. |
Yes, the cause is: It may also be considered a But i think the root cause is thread-loader, which configured to dealing with ts or js in If you remove thread-loader from ts or js rule, it works fine yet. |
Isn't this a bug of Either way this is not something that can be fixed in Vue core. /cc @sodatea |
Fixed in |
FWIW this should still be considered a bug in |
用的 webpack 5 、改成 vue-loader@16.3.1 ,没有用 thread-loader 生产环境还是有问题。 |
|
vue 2.7 with vite in production mode also fails. reproduction: https://github.com/hxgqh/vite_vue2.7 |
Version
3.0.11
Reproduction link
https://github.com/huangxiaochang/vue-next-issue
https://huangxiaochang.github.io/vue-next-issue/
Steps to reproduce
When I build the project, the css block is builded to :
And generating css var code is builded to:
Because the var name '--109c9849' in css block is not in line with 'fae5bece-homeHeight' in js block,
So the min-height is Incorrect.
This may be a bug in Vue-loader, because it compile css block and script block with different env.(building css block with production, but development in js block).
What is expected?
css var name is consistent between css block and js block
What is actually happening?
it may be a bug in thread-loader used by vue-loader-v16
visiting https://huangxiaochang.github.io/vue-next-issue/ and clicking home route, inspecting the 'hello word', you can see it's dom style and css.
The text was updated successfully, but these errors were encountered: