Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DON'T MERGE] make client entry points explicit #466

Closed
wants to merge 1 commit into from

Conversation

Rich-Harris
Copy link
Member

Hit a bug on a decently-sized app where a chunk wasn't being created for one of the dynamically imported entry points representing a specific page. It's something to do with Rollup's code-splitting algo — if I remove certain imports from the page in question it gets chunked up correctly — but I don't have the bandwidth to delve too deeply into it.

Luckily I don't need to — we can just be explicit about what the entry points are. Bonus: in doing so we can make the file structure of the build much more navigable.

@Rich-Harris Rich-Harris changed the title [DON"make client entry points explicit [DON'T MERGE] make client entry points explicit Mar 8, 2021
@Rich-Harris
Copy link
Member Author

Whoops, must have fat-fingered Cmd-Enter or something before I finished writing the comment. This is marked 'don't merge' because it will conflict with #463, so I'm inclined to merge that first

@Rich-Harris
Copy link
Member Author

Rich-Harris commented Mar 8, 2021

the tests are passing! did the windows bug get fixed @GrygrFlzr or is it related to this PR somehow?!

@GrygrFlzr
Copy link
Member

the tests are passing!

That's because it's broken something and is skipping a large number of tests entirely, if you take a look at the CI run: https://github.com/sveltejs/kit/pull/466/checks?check_run_id=2057620666

build:amp
 build:amp  vite v2.0.4 building for production...
✓ 0 modules transformed.
Could not resolve entry module (.svelte/build/runtime/internal/start.js).
Error: Could not resolve entry module (.svelte/build/runtime/internal/start.js).
    at error (D:\a\kit\kit\node_modules\.pnpm\rollup@2.40.0\node_modules\rollup\dist\shared\rollup.js:5279:30)
    at ModuleLoader.loadEntryModule (D:\a\kit\kit\node_modules\.pnpm\rollup@2.40.0\node_modules\rollup\dist\shared\rollup.js:18738:20)
    at async Promise.all (index 0) {
  code: 'UNRESOLVED_ENTRY',
  watchFiles: [
    'D:/a/kit/kit/packages/kit/test/apps/amp/src/routes/invalid/index.svelte',
    'D:/a/kit/kit/packages/kit/test/apps/amp/src/routes/valid/index.svelte',
    'D:/a/kit/kit/packages/kit/test/apps/amp/src/routes/valid/index.json.js'
  ]
}
(node:2936) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'close' of undefined
    at file:///D:/a/kit/kit/packages/kit/test/test.js:176:19
    at Number.runner (file:///D:/a/kit/kit/node_modules/.pnpm/uvu@0.5.1/node_modules/uvu/dist/index.mjs:90:29)
(node:2936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:2936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
transforming...

@Rich-Harris
Copy link
Member Author

🙃 I thought it was too good to be true — thanks

@Rich-Harris
Copy link
Member Author

I made the same changes in #463, so I'll close this

@Rich-Harris Rich-Harris closed this Mar 8, 2021
@Conduitry Conduitry deleted the client-entries branch April 1, 2021 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants