Comments (5)
能给个复现么
from vue-countup-v3.
可能是因为我的主项目的 package.json 文件就是要求 "type": "module",所以会出现这个错误,但这个要求我没有办法更改。
主项目的 package.json 部分内容如下:
"type": "module","private": true,
"vue": "^3.2.47"
引入代码:
`<script setup lang="ts">
import CountUp from 'vue-countup-v3';
const { endVal = 384200 } = defineProps<{
endVal: number;
}>()
</script>
使用命令: npm build 执行代码构建。
修改 /node_modules 文件夹中的 vue-countup-v3 的 package.json 文件:
"types": "dist/countup.vue.d.ts", "type": "module",
只是加上了 "type": "module", 就可以构建成功。
但是加上了这个之后,npm run dev 就会报错,必须要去掉才可以运行成功。
from vue-countup-v3.
你是在 nuxt 中用的?配置下 build.transpile
, 参考 issue
import { defineNuxtConfig } from 'nuxt3';
export default defineNuxtConfig({
build: {
transpile: ['vue-countup-v3'],
},
});
from vue-countup-v3.
我的项目并不是 nuxt 框架的,而是使用 astro+vue3
from vue-countup-v3.
我的项目并不是 nuxt 框架的,而是使用 astro+vue3
加个指令 client:only
<CountUp client:load client:only end-val={2000} />
相关 issue: withastro/astro#6321
from vue-countup-v3.
Related Issues (20)
- 在线示例(Online example) HOT 2
- `Could not find a declaration file for module 'vue-countup-v3'` HOT 2
- enableScrollSpy 这个属性我为啥设置了不生效呢,没有出现在可见区域就已经滚动完了 HOT 3
- end-val发生变化会从0开始 HOT 4
- 千分符没有生效 HOT 2
- vite打包报错 HOT 4
- pnpm 安装依赖的时候为什么会卡住呢,下不了 HOT 1
- 播放完成回调无法触发 HOT 2
- 如何想要单独为前后缀添加样式,如何实现 HOT 1
- smartEasingThreshold is undefined HOT 5
- cannot read properties of undefined (reading 'defineComponent') HOT 2
- 不能修改初始值 HOT 1
- 页面上使用多个count-up 配合Odometer翻牌器动画 渲染会有问题 页面上只能看到一个count-up HOT 1
- 引入组件报错 HOT 6
- 小数点精度丢失 能否解决 HOT 2
- Lower versions such as Android 9 are not compatible HOT 5
- Options don't work properly if used enableScrollSpy, scrollSpyDelay, scrollSpyOnce HOT 3
- 用这个还需要装countup.js吗 HOT 4
- 希望能增加一个不处理小数点的配置 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-countup-v3.