1.0.8 • Published 7 years ago

kotlin-webpack-plugin v1.0.8

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

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 = require('../plugin');

module.exports = {
  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.resolve(__dirname, '../kotlin_build'),
        use: ['source-map-loader'],
        enforce: 'pre',
      },
    ],
  },

  output: {
    path: __dirname + '/build',
    filename: 'build.js',
  },

  plugins: [
    new KotlinWebpackPlugin({
      src: __dirname + '/src',
    })
  ]
};

Also see example.

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago