François
12/15/2024, 9:39 AMModule not found: Error: Can't resolve 'fs' in '.../build/js/packages/ktorfilecaching-test/kotlin'
Module not found: Error: Can't resolve 'path' in '.../build/js/packages/ktorfilecaching-test/kotlin'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
Module not found: Error: Can't resolve 'os' in '/Users/francoisdabonot/DEV/KtorKMPFileCaching/build/js/packages/ktorfilecaching-test/kotlin'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
- install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }
Chrimaeon
12/15/2024, 9:41 AMFrançois
12/15/2024, 9:42 AMFrançois
12/15/2024, 9:42 AMChrimaeon
12/15/2024, 9:44 AMFrançois
12/15/2024, 9:44 AMEdoardo Luppi
12/15/2024, 4:48 PMFrançois
12/15/2024, 5:09 PMFrançois
12/15/2024, 5:28 PMEdoardo Luppi
12/15/2024, 5:29 PMFrançois
12/15/2024, 5:32 PMw: Kotlin Target 'js()' is already declared.
Declaring multiple Kotlin Targets of the same type is not supported.
But it’s still working on kotlin 2.1.0François
12/15/2024, 5:33 PMFrançois
12/15/2024, 5:34 PMEdoardo Luppi
12/15/2024, 5:35 PMEdoardo Luppi
12/15/2024, 5:36 PMFrançois
12/15/2024, 5:39 PMEdoardo Luppi
12/15/2024, 5:39 PMEdoardo Luppi
12/15/2024, 5:40 PMI’m sticking with my current solution until there is a real oneI will probably do the same once I get to the point of targeting the browser.
Edoardo Luppi
12/15/2024, 5:40 PMEdoardo Luppi
12/15/2024, 5:42 PM@JsModule
, as that creates an AOT import of the module, and immediately breaks on browsers.François
12/15/2024, 5:48 PM