@wasm-tool/kotlin-loader
v0.0.1
Published
Kotlin loader for webpack
Downloads
4
Readme
@wasm-tool/kotlin-loader
Webpack loader for Kotlin
Installation
yarn add --dev @wasm-tool/kotlin-loader
Kotlin-native
We expect kotlin-native
to be in your $PATH
. To install check here
Usage
Add the loader and plugin in your webpack.config.js
here:
module.exports = {
// ...
module: {
rules: [
{
test: /Main.kt$/,
loader: "@wasm-tool/kotlin-loader"
}
]
},
// ...
plugins: [
new HtmlWebpackPlugin({
template: 'index.html'
}),
]
// ...
};
Add this script to the index.html
template
<script wasm="program.wasm" src="program.wasm.js"></script>