tiddly-gittly / Modern.TiddlyDev

Modern TiddlyWiki Developing Environment
https://tiddly-gittly.github.io/Modern.TiddlyDev/
MIT License
57 stars 3 forks source link

Option to configue loader #58

Closed linonetwo closed 5 months ago

linonetwo commented 9 months ago
X [ERROR] No loader is configured for ".svg" files: node_modules/.pnpm/bpmn-js@16.0.0/node_modules/bpmn-js/dist/assets/bpmn-font/font/bpmn.svg?16406289#bpmn

    temp_stylePlugin:node_modules\.pnpm\bpmn-js@16.0.0\node_modules\bpmn-js\dist\assets\bpmn-font\css\bpmn-embedded.css:5:11:
      5 │        url('../font/bpmn.svg?16406289#bpmn') format('svg');
        ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] No loader is configured for ".eot" files: node_modules/.pnpm/bpmn-js@16.0.0/node_modules/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot?16406289

    temp_stylePlugin:node_modules\.pnpm\bpmn-js@16.0.0\node_modules\bpmn-js\dist\assets\bpmn-font\css\bpmn-embedded.css:3:11:
      3 │   src: url('../font/bpmn.eot?16406289');
        ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] No loader is configured for ".eot" files: node_modules/.pnpm/bpmn-js@16.0.0/node_modules/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot?16406289#iefix

    temp_stylePlugin:node_modules\.pnpm\bpmn-js@16.0.0\node_modules\bpmn-js\dist\assets\bpmn-font\css\bpmn-embedded.css:4:11:
      4 │   src: url('../font/bpmn.eot?16406289#iefix') format('embedded-opentype'),
        ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

E:\repo\workflow\node_modules\.pnpm\esbuild@0.14.54\node_modules\esbuild\lib\main.js:1624
  let error = new Error(`${text}${summary}`);

How to config loader

linonetwo commented 9 months ago

https://github.com/tiddly-gittly/Modern.TiddlyDev/issues/53

https://github.com/tiddly-gittly/Modern.TiddlyDev/issues/44

linonetwo commented 9 months ago

最新版已经修复了,


syncer-server-filesystem: Dispatching 'save' task: $:/StoryList
Compiling...
████████████████████████████████████████ 100% | workflow

Error executing boot module $:/plugins/linonetwo/workflow/bpmn-widget.js: ReferenceError: window is not defined

ReferenceError: window is not defined
    at node_modules/.pnpm/hammerjs@2.0.8/node_modules/hammerjs/hammer.js ($:/plugins/linonetwo/workflow/bpmn-widget.js:2282:8)
    at __require ($:/plugins/linonetwo/workflow/bpmn-widget.js:13:50)
    at $:/plugins/linonetwo/workflow/bpmn-widget.js:17073:31
    at $:/plugins/linonetwo/workflow/bpmn-widget.js:38957:4
    at $tw.utils.evalGlobal ($:/boot/boot.js:616:12)
    at $tw.utils.evalSandboxed ($:/boot/boot.js:623:19)
    at $tw.modules.execute ($:/boot/boot.js:904:15)
    at $:/boot/boot.js:944:30
    at $tw.utils.each ($:/boot/boot.js:155:12)
    at $tw.modules.forEachModuleOfType ($:/boot/boot.js:943:12)
fatal error: all goroutines are asleep - deadlock!

但你没有发布 @Gk0Wk https://github.com/tiddly-gittly/plugin-dev-cli

oeyoews commented 8 months ago

最新版已经修复了,


syncer-server-filesystem: Dispatching 'save' task: $:/StoryList
Compiling...
████████████████████████████████████████ 100% | workflow

Error executing boot module $:/plugins/linonetwo/workflow/bpmn-widget.js: ReferenceError: window is not defined

ReferenceError: window is not defined
    at node_modules/.pnpm/hammerjs@2.0.8/node_modules/hammerjs/hammer.js ($:/plugins/linonetwo/workflow/bpmn-widget.js:2282:8)
    at __require ($:/plugins/linonetwo/workflow/bpmn-widget.js:13:50)
    at $:/plugins/linonetwo/workflow/bpmn-widget.js:17073:31
    at $:/plugins/linonetwo/workflow/bpmn-widget.js:38957:4
    at $tw.utils.evalGlobal ($:/boot/boot.js:616:12)
    at $tw.utils.evalSandboxed ($:/boot/boot.js:623:19)
    at $tw.modules.execute ($:/boot/boot.js:904:15)
    at $:/boot/boot.js:944:30
    at $tw.utils.each ($:/boot/boot.js:155:12)
    at $tw.modules.forEachModuleOfType ($:/boot/boot.js:943:12)
fatal error: all goroutines are asleep - deadlock!

但你没有发布 @Gk0Wk https://github.com/tiddly-gittly/plugin-dev-cli

这种window问题怎么解决的呢? import 只能放在顶部, 动态导入吗?

oeyoews commented 8 months ago

暂时改用require 了

oeyoews commented 8 months ago

暂时改用require 了

linonetwo commented 5 months ago

这种window问题怎么解决的呢?

参考 https://github.com/tiddly-gittly/tiddlywiki-whiteboard/blob/eba32075377bb54920e1f01a25ae925e26a131e3/src/tw-whiteboard/widget-loader.js 额外包一层,在这一层里检查。然后原来的Widget改成 library。