Closed Kaiyan-Zhang closed 2 years ago
Reproduced.
Seems that everything works well with following workaround 🤔
- speed: 1000,
+ speed: '1000ms',
...
- animation-duration: v-bind(speed + 'ms');
+ animation-duration: v-bind(speed);
Caused by the usage of postcss-csso
. Fixed by removing it.
However, it could still be an issue of vite. Reported here https://github.com/vitejs/vite-plugin-vue/issues/9
I'm using vuepress2
2.0.0-beta.36
version, this is the only package I used.As it's known by all, we can use
v-bind
in<style>
aftervue3.2
, and my version of vuepress2 supportsvue3.2
.However, it seems that: while the
v-bind
works in dev mode, it does not work after the vite build.我正在使用vuepress2
2.0.0-beta.36
版本,我只用了这一个库。众所周知,在
vue3.2
之后,我们可以在<style>
里面用v-bind
。它似乎在dev模式下是生效的,但是但我用打包之后就不行了。现在vuepress默认用的是vite,我估计是vite的锅。
Bug report
Description
To get the point, there's only one
README.md
in my project:As you can see, I used
v-bind
to refer the variablespeed
defined indata()
, that's all. The animation should be activated, but failed to work after vite building.Steps to reproduce
Please just simply clone this tiny project, checkout to
test
branch, runnpm i; npm run build;
to see the problem.Expected behavior
Under dev mod(
vuepress dev docs
), the breath animation is activated well.Actual begavior
I used
vuepress build docs
, after building, no breath animation.Environment info
vuepress info
:This is not something for windows, because it's same on mac. 这和我用不用windows没有关系,我在mac上试了也是有bug。
I tried to separate the html from markdown, like what I did in "activate" branch:
But the buggy phenomenon was still the same.
我知道把markdown和vue写在一起可能不好,但是尽管我把两者分开了,现象还是没有变化。
Vitepress?
Compared to vuepress, I tried vitepress, the
v-bind()
works there. repo: https://gitee.com/kaiyan3/vitepress-starter我刚试了一下Vitepress,效果很好,不会有这些问题