Hi, I am trying to upgrade 4.5.0 and I have issue ...
# kvision
t
Hi, I am trying to upgrade 4.5.0 and I have issue with webpack. I am not sure how to configure it properly (continue in thread...)
r
Have you followed the migration guide?
t
For example when I change file.js as in migration example:
Copy code
config.module.rules.push(
    {
        test: /\.(jpe?g|png|gif|svg)$/i,
        type: 'asset/resource'
    }
);
I got error:
Copy code
✖ 「wds」: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module.rules[5].type should be one of these:
   "javascript/auto" | "javascript/dynamic" | "javascript/esm" | "json" | "webassembly/experimental"
   -> Module type to use for the module
I tried lookup
type
property in webpack docs but I didn't find any reference.
r
could you zip the content of your webapck.config.d and send to me?
The migrated files from you work fine for me.
No errors from webpack.
Could you check which webpack version do you have in
build/js/node_modules/webpack
?
t
4.42.1
r
Have you upgraded Kotlin in your project?
4.5.0 is for Kotlin 1.5.0 and it should use webpack 5.27.1
t
I see, I didn't realize it
I am trying it now with kotlin 1.5.0
Thank you. Now I have different issues relate to
Copy code
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
I am going to clear it.
We are on 4.5.0 🎉
👍 1
r
btw. you don't need
jed.js
anymore in your webpack config
and I suggest updating other files based on the kvision template project
t
Thank you.