In the old frontend plugin I could do this: ```kot...
# javascript
r
In the old frontend plugin I could do this:
Copy code
kotlinFrontend {
    define("PRODUCTION", true)
}
How to achieve the same in the new Kotlin/JS plugin?
i
If you can set production mode for webpack, you can set it in plain js file in
webpack.config.d
folder
Copy code
config.mode = 'production' // set production mode to webpack
config.devtool = 'source-map' // or even false - it configure source map not to inline into bundle
Since 1.3.70 production and development build will be builtin You can just run necessary task for development or for production
r
But can I read this mode inside the
js
file in
webpack.config.d
?
currently I've got:
Copy code
if (defined.PRODUCTION) {
 // ...
}