The loader of .kojo file for webpack.
  • JavaScript 100%
Find a file
2026-03-01 16:15:37 +08:00
src feat: optimize the result of parse-kojo.js 2026-03-01 16:15:37 +08:00
.gitignore refactor 2025-03-16 16:24:05 +08:00
package.json chore: updates author 2025-09-04 14:58:43 +08:00
README.md docs 2025-03-16 09:59:13 +08:00

kojo-loader

加载 .kojo 文件并将其编译为 JavaScript 代码。用于使用 webpack 打包 ere 游戏项目。

Load a .kojo file and compiles it to JavaScript. For packing ere game by webpack.

开始/Getting Started

使用 npm 安装 kojo-loader:

To begin, you'll need to install kojo-loader:

npm install -save-dev git+https://gitgud.io/umaera/engine/kojo-loader.git

然后在 webpack.config.js 中注册:

Then register it in webpack.config.js:

// webpack.config.js
// ...
rules: [
  {
    test: /\.kojo$/,
    use: [
      {
        loader: require.resolve('kojo-loader'),
        options: {
          sdkPath: '#/era-electron',
        },
      },
    ]
  }
]
// ...

请将 #/era-electron 替换成项目中 SDK 以#开始的路径
Please replace #/era-electron with the path to the sdk file (started with #) in your game project