npm

Need private packages and team management tools?Check out npm Orgs. »

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

4

version

1.0.8

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability