Skip to content

turansky/kfc-plugins

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
kfc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CI Status CI Status Gradle Plugin Portal Maven Central Kotlin

Kotlin/JS Fast Configuration

Table of contents

webpack

Goal

  • Non-static webpack configuration
  • Make Kotlin resources content available for Webpack

Task patchWebpackConfig

plugins {
  kotlin("js") version "1.7.0"
  id("io.github.turansky.kfc.webpack") version "5.50.0"
}

kotlin.js {
    browser()
}

tasks {
    patchWebpackConfig {
        // language=JavaScript
        patch(
            """
            config.output.library.export = ['com', 'example', 'app']
        """)
    }
}

Attention

webpack.config.d directory will be used as temp. Add following .gitignore instruction to exclude directory from Git:

webpack.config.d/

Resources

By default webpack plugin add src/main/resources directory of:

  • Current subproject
  • Dependency subprojects

as Webpack modules.

library

Apply webpack plugin by default

Goal

  • Fast build
  • Modularity

Decision

  • Disable DCE
  • Disable Webpack build
  • Kotlin/JS target - commonjs

build.gradle.kts

plugins {
  kotlin("js") version "1.7.0"
  id("io.github.turansky.kfc.library") version "5.50.0"
}

About

Kotlin/JS Fast Configuration

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages