The loader of .kojo file for webpack.
- JavaScript 100%
| src | ||
| .gitignore | ||
| package.json | ||
| README.md | ||
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