And another question: currently I have: ```config....
# javascript
r
And another question: currently I have:
Copy code
config.plugins.push(new webpack.ProvidePlugin({
    $: "jquery",
    jQuery: "jquery",
    "window.jQuery": "jquery"
}));
in
webpack.config.d/jquery.js
. With new Kotlin/JS plugin it fails with an error:
Copy code
webpack.config.js:69
config.plugins.push(new webpack.ProvidePlugin({
                        ^
ReferenceError: webpack is not defined
i
You just need to “import” this package (in fact in js world it will be
require
) You need add to begin of your js file next
Copy code
const webpack = require('webpack')
Additionally, if you do that you require
webpack
, but we append all scripts in one js config If other script require
webpack
too, you can get error with duplicated declaration. To avoid it you can define module
Copy code
;(function() {
    const webpack = require('webpack')

    config.plugins.push(new webpack.ProvidePlugin({
        $: "jquery",
        jQuery: "jquery",
        "window.jQuery": "jquery"
    }));
})();
👍 1