Giter VIP home page Giter VIP logo

Comments (3)

chenyulun avatar chenyulun commented on June 18, 2024

如何避免首次聚焦文件非入口文件的,导致入口文件不编译的问题,
或者最后遍历的时候判断条件去掉,或者
if (filename !== mainFile.value || activeFile.value !== mainFile.value)
首次如果入口文件不是聚焦文件,那也需要编译一次

from repl.

chenyulun avatar chenyulun commented on June 18, 2024

by the way:
还有一个创建沙盒的时候,能保证所有文件都编译(异步)完成了吗?虽然速度很快,但是他们之间没有异步的等待, 如果要关联,得在File里面设置状态属性或者函数,读取的时候保证编译成功

还有一个想法就: 把编译动作集成到File类里面,读取compiled的时候再去编译,并且缓存,存在的情况下不再编译,修改后清除编译缓存,页面重新执行渲染的时候再编译,可以避免文件未使用的时候进行多次无意义的编译

这样好像会把很多都变成异步,也不太行

from repl.

sxzz avatar sxzz commented on June 18, 2024

Could you please provide a minimal reproduction for me? I'll appreciate it.

from repl.

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.