scratch-ui自定义开发笔记

scratch官网不能访问了,孩子没法学了,不想使用国内二次开发的网站,倒不如自己二次开发一个

scratch-gui是代码开源在github上,具体地址为:https://github.com/LLK/scratch-gui.git

 

1.执行yarn build的时候报错

    ERROR in ./src/playground/index.jsx
    Module build failed (from ./node_modules/babel-loader/lib/index.js):
    Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in D:\git\scratch-gui\node_modules\@babel\helper-compilation-targets\package.json
        at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
        ....

根据错误提示看到是package.json中的配置问题,把下面红色的一行去掉就可以编译通过了

{
  "name": "@babel/helper-compilation-targets",
  "version": "7.8.0",
  "author": "The Babel Team (https://babeljs.io/team)",
  "license": "MIT",
  "description": "Engine compat data used in @babel/preset-env",
  "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-compilation-targets",
  "main": "lib/index.js",
  "type": "commonjs",
  "exports": false, 
  ...
 }

启动以后在浏览器中打开:http://localhost:8601

2.静态资源

参见本blog的另外一篇随笔

3.自定义logo

4.添加登录功能

posted on 2021-02-23 21:32  Netsharp  阅读(389)  评论(0编辑  收藏  举报

导航