kotlin-webpack-plugin
A webpack plugin that compiles Kotlin sources
Installation
npm i kotlin-webpack-plugin --save-dev
Usage
Example of webpack configuration:
const KotlinWebpackPlugin = ; moduleexports = entry: 'kotlinApp' // kotlinApp is the default module name resolve: // "kotlin_build" is where the compiled Kotlin code (kotlinApp.js) is outputted modules: 'node_modules' 'kotlin_build' // [OPTIONAL] To enable sourcemaps, source-map-loader should be configured module: rules: test: /\.js$/ include: path use: 'source-map-loader' enforce: 'pre' output: path: __dirname + '/build' filename: 'build.js' plugins: src: __dirname + '/src' ;
Also see example.