sherwinshen / vue3-text-clamp

📄 Vue3 component which allows you to ellipsis your multiline text
https://sherwinshen.github.io/vue3-text-clamp
MIT License
36 stars 6 forks source link

我是vue3的项目,vue的版本是3.2.37,然后是webpack4,安装你的插件的时候,出现了错误 #1

Closed KBKUN024 closed 2 years ago

KBKUN024 commented 2 years ago

image 而我所做的,仅仅是写了这句代码: image 说我的loader有问题,请问您知道,我应该使用什么loader吗?

KBKUN024 commented 2 years ago

不管是全局导入还是在组件内按需导入,都有这个问题

KBKUN024 commented 2 years ago

顺带一提,我的项目是使用js写的,不是ts,不知道有没有影响

sherwinshen commented 2 years ago

我看了下报错的地方是有?.的语法,应该项目不支持es6的特性,需要处理下。也许你可以试一下vue.config.js文件里加一行transpileDependencies: ['/vue3-text-clamp/']

KBKUN024 commented 2 years ago

好的,谢谢你啦,我去试一下

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Sherwin @.> 发送时间: 2022年9月3日 12:31 收件人: sherwinshen/vue3-text-clamp @.> 抄送: KBKUN024 @.>, Author @.> 主题: Re: [sherwinshen/vue3-text-clamp] 我是vue3的项目,vue的版本是3.2.37,然后是webpack4,安装你的插件的时候,出现了错误 (Issue #1)

我看了下报错的地方是有?.的语法,应该项目不支持es6的特性,需要处理下。也许你可以试一下vue.config.js文件里加一行transpileDependencies: ['/vue3-text-clamp/']

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

KBKUN024 commented 2 years ago

好像行不通

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Sherwin @.> 发送时间: 2022年9月3日 12:31 收件人: sherwinshen/vue3-text-clamp @.> 抄送: KBKUN024 @.>, Author @.> 主题: Re: [sherwinshen/vue3-text-clamp] 我是vue3的项目,vue的版本是3.2.37,然后是webpack4,安装你的插件的时候,出现了错误 (Issue #1)

我看了下报错的地方是有?.的语法,应该项目不支持es6的特性,需要处理下。也许你可以试一下vue.config.js文件里加一行transpileDependencies: ['/vue3-text-clamp/']

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

KBKUN024 commented 2 years ago

我加了你说的那句代码,但是只要在main.js一import就会报之前那个错误

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Sherwin @.> 发送时间: 2022年9月3日 12:31 收件人: sherwinshen/vue3-text-clamp @.> 抄送: KBKUN024 @.>, Author @.> 主题: Re: [sherwinshen/vue3-text-clamp] 我是vue3的项目,vue的版本是3.2.37,然后是webpack4,安装你的插件的时候,出现了错误 (Issue #1)

我看了下报错的地方是有?.的语法,应该项目不支持es6的特性,需要处理下。也许你可以试一下vue.config.js文件里加一行transpileDependencies: ['/vue3-text-clamp/']

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

s90180007 commented 2 years ago

I have the same error (