I am trying to convert my whole code from React to Svelte 5. I wasn’t getting this issue, when I was using Svelte 4 concepts (stores), the plugin was working. But when I changed my whole code to svelte 5 (runes). The plugin is not loading anymore, like I am getting failed to load plugin
Notice.
I am getting following warning in npm terminal :
> [email protected] dev
> node esbuild.config.mjs
(node:20892) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
▲ [WARNING] The CommonJS "module" variable is treated as a global variable in an ECMAScript module and may not work as expected [commonjs-variable-in-esm]
src/shared.svelte.ts:42:0:
42 │ module.exports = __toCommonJS(stdin_exports);
╵ ~~~~~~
This file is considered to be an ECMAScript module because the enclosing "package.json" file sets
the type of this file to "module":
package.json:6:9:
6 │ "type": "module",
╵ ~~~~~~~~
Node's package format requires that CommonJS files in a "type": "module" package use the ".cjs"
file extension.
Please ignore my code, its in worst state right now, as I am learning this new runes concept parallelly. This issue might be due to some bad coding practice (I have faced this in past). But since I got that warning, I want to ensure its not related to bundling or because of svelte 5 concepts, like Universal reactivity using runes.
The config files can be found from here : https://github.com/tu2-atmanand/Task-Board/tree/svelteMigration