I get an error when trying to use code splitting with the code below:
<script>
import { post } from "/src/store";
import { onMount } from "svelte";
let AppHeader;
onMount(async () => {
AppHeader = (await import("/src/components/AppHeader/index.svelte")).default;
});
function onInputName(e) {
$post.address.street = e.target.value;
}
</script>
<main>
<svelte:component this={AppHeader} />
<input type="text" on:input={onInputName} value={$post.firstName} />
<h3>{$post.firstName}</h3>
<h4>{$post.address.street}</h4>
</main>
<style lang="scss">
@import "./style.scss";
</style>
The error I receive is the following:
× Build failed.
@parcel/packager-js: The expression evaluated to a falsy value:
(0, _assert().default)(!this.bundle.hasAsset(resolved))
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
(0, _assert().default)(!this.bundle.hasAsset(resolved))
at C:\projects\svelte-project\node_modules\@parcel\packager-js\lib\DevPackager.js:105:33
at C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:520:16
at C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:520:16
at walk (C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:385:26)
at walk (C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:407:22)
at walk (C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:407:22)
at walk (C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:407:22)
at walk (C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:407:22)
at ContentGraph.dfs (C:\projects\svelte-project\node_modules\@parcel\graph\lib\Graph.js:433:12)
at BundleGraph.traverseBundle (C:\projects\svelte-project\node_modules\@parcel\core\lib\BundleGraph.js:726:24)
@orlov-vo
Excellent work on this transformer.
I get an error when trying to use code splitting with the code below:
The error I receive is the following:
Am I missing a config? Thank you.