Have ideas to improve npm?Join in the discussion! »

    This package has been deprecated

    Author message:

    This package has been moved under @jetbrains scope and is now available as @jetbrains/kotlin-webpack-plugin

    kotlin-webpack-plugin

    1.0.8 • Public • Published

    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.

    Install

    npm i kotlin-webpack-plugin

    DownloadsWeekly Downloads

    5

    Version

    1.0.8

    License

    Apache-2.0

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar