GithubHelp home page GithubHelp logo

Comments (9)

Vanessa219 avatar Vanessa219 commented on June 18, 2024

cdn 设置为本地的地址就可以了。

from vditor.

FuAdmin avatar FuAdmin commented on June 18, 2024

不知道作者为什这么执着用CDN。。。。。。。

from vditor.

Vanessa219 avatar Vanessa219 commented on June 18, 2024

速度飞起呀

from vditor.

bear-joe avatar bear-joe commented on June 18, 2024

我感觉本地更快,cdn太不稳定了,大项目更是追求稳定,还是建议作者优先本地,cdn作为备选,这么好的插件cdn会劝退不少人感觉。。。。

from vditor.

Vanessa219 avatar Vanessa219 commented on June 18, 2024

@bear-joe 可以使用本地的

from vditor.

newproplus avatar newproplus commented on June 18, 2024

@Vanessa219

请问本地cdn怎么写?

我在项目根目录建了个目录 vditor_cdn, 把 dist 目录放进去了, 即 dist 目录是 vditor_cdn 目录的子目录.

cdn 写成 './vditor_cdn'

import Vditor from 'vditor' 但是会报错:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'Md2VditorIRDOM')", source: http://192.168.1.20:1420/node_modules/.vite/deps/vditor.js?v=fdd27565 (5164)

import Vditor from '@/../vditor_cdn/dist/index' 会找不到文件

import Vditor from '@/../vditor_cdn/dist/index.min.js' 会报错:

11:20:23 [vite] Pre-transform error: Maximum call stack size exceeded
11:20:34 [vite] Internal server error: Maximum call stack size exceeded

按个人理解, 如果不配置cdn应该是把所有文件大打包, 只有明确指定了cdn才应该通过网络获取cdn上的文件吧. 但是我测试的结果是不设置cdn一样会从默认的cdn上获取文件. 这让想离线使用的项目难搞了..

版本 3.9.8, 请问该如何解决?

from vditor.

Vanessa219 avatar Vanessa219 commented on June 18, 2024

修改为 dist 访问的路径 https://xxxx

from vditor.

newproplus avatar newproplus commented on June 18, 2024

修改为 dist 访问的路径 https://xxxx

必须走网络,不能直接使用本地的文件打包到一起?

from vditor.

Vanessa219 avatar Vanessa219 commented on June 18, 2024

用上线后可以访问的地址就可以了。

from vditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.