profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/jplhomer/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Josh Larson jplhomer @shopify Des Moines, IA https://jplhomer.org Developer at @shopify

flareact/flareact 1237

Edge-rendered React framework built for Cloudflare Workers

jplhomer/fresa 44

🍓 Developing WordPress should be sweet.

banderson623/SnoozeBar 12

Mac OS timed Do Not Disturb menu bar app

brilarson/wedding-website 1

Bri and Josh wedding website.

jplhomer/creative 1

A challenge to create something new every day

jplhomer/docker-images 1

Docker Images that I use sometimes.

jplhomer/facebook-voice 1

A voice-controlled search for Facebook.

jplhomer/garage-sales 1

Garage sale app for City of Waukee

jplhomer/graphql-lightning-webgeeks-2018 1

GraphQL Lightning Talk for DSM Web Geeks

jplhomer/2016-holiday-card 0

2016 Larson Holiday Card

push eventjplhomer/site

Josh Larson

commit sha 63033f7e0f66fef968af96ef8d17cbc10461c4cd

Bold that shit

view details

push time in 22 days

push eventjplhomer/site

Josh Larson

commit sha 9db15f49e472914970bfe942ff3aab8e4b5491bf

RIP Performance team

view details

push time in 22 days

push eventjplhomer/site

Josh Larson

commit sha 204197098423a9688a1ea14cb50fe421b92c3fb1

Staff > Senior Staff

view details

push time in 22 days

pull request commentvitejs/vite

fix(ssr): use `tryNodeResolve` instead of `resolveFrom`

Hiya @aleclarson I read somewhere that this PR also adds support for exports for SSR module imports during SSR — is that true? If so, anything I can do to help move this forward?

aleclarson

comment created time in a month

issue commentvitejs/vite

ssr: Nested built-in dependencies of ESM dependencies can't be resolved

Thanks, @ygj6. You're a hero!

jplhomer

comment created time in a month

startedbrunosimon/my-room-in-3d

started time in a month

startedexhibitionist-digital/ultra

started time in a month

startedthreepointone/server-components-demo

started time in 2 months

pull request commentvitejs/vite

fix: special handling for ssr.noExternal in mergeConfig

NICE thanks @frandiox

frandiox

comment created time in 2 months

startedreactwg/react-18

started time in 2 months

issue openedShopify/shipit-engine

Node version cannot be defined

When using Shipit + Lerna integration, we found that the version of node is locked at v12.

We'd love to be able to specify a version of Node, seeing as Node.js v12 is in maintenance mode and we need features introduced in Node v14.

Our current workaround is to set engine in package.json to v12 to prevent errors from being thrown when publishing packages with Lerna on Shipit.

created time in 2 months

issue openedvitejs/vite

ssr: Nested built-in dependencies of ESM dependencies can't be resolved

Describe the bug

When I attempt to load an entrypoint with ssrLoadModule which references an ESM dependency e.g. https://github.com/jplhomer/repro-ssr-pkg, there is an esbuild error indicating the built-in dependency cannot be loaded.

This only happens during the optimize missing deps phase of the dev server.

Potential similar issues, but slightly different:

Reproduction

https://github.com/jplhomer/repro-ssr-modules

System Info

System:
    OS: macOS 11.5.2
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 254.77 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 15.9.0 - ~/.nvm/versions/node/v15.9.0/bin/node
    Yarn: 1.22.11 - ~/.nvm/versions/node/v15.9.0/bin/yarn
    npm: 7.5.3 - ~/.nvm/versions/node/v15.9.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 92.0.4515.159
    Firefox: 86.0
    Safari: 14.1.2
  npmPackages:
    vite: ^2.5.0 => 2.5.0

Used Package Manager

yarn

Logs

2:26:32 PM [vite] new dependencies found: repro-ssr-pkg, updating...
 > node_modules/react-dom/cjs/react-dom-server.node.development.js:18:21: error: Could not read from file: /Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/stream
    18 │ var stream = require('stream');
       ╵                      ~~~~~~~~

2:26:32 PM [vite] error while updating dependencies:
Error: Build failed with 1 error:
node_modules/react-dom/cjs/react-dom-server.node.development.js:18:21: error: Could not read from file: /Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/stream
    at failureErrorWithLog (/Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:1449:15)
    at /Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:1131:28
    at runOnEndCallbacks (/Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:921:63)
    at buildResponseToResult (/Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:1129:7)
    at /Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:1236:14
    at /Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:609:9
    at handleIncomingPacket (/Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:706:9)
    at Socket.readFromStdout (/Users/joshlarson/src/github.com/jplhomer/repro-ssr-modules/node_modules/esbuild/lib/main.js:576:7)
    at Socket.emit (node:events:378:20)
    at Socket.EventEmitter.emit (node:domain:470:12)

Validations

created time in 2 months

create barnchjplhomer/repro-ssr-modules

branch : main

created branch time in 2 months

created repositoryjplhomer/repro-ssr-modules

created time in 2 months

push eventjplhomer/repro-ssr-pkg

Josh Larson

commit sha 16b04d3685bb07f420a1501f4efeaf6cb7ac7c3f

Try ESM

view details

push time in 2 months

create barnchjplhomer/repro-ssr-pkg

branch : main

created branch time in 2 months

created repositoryjplhomer/repro-ssr-pkg

created time in 2 months

delete branch jplhomer/vite

delete branch : ssr-bundle

delete time in 2 months

push eventjplhomer/vite

Josh Larson

commit sha 0afad18681d4936d2bf14a878b832315fae8179c

chore: revert changes to untouched file

view details

push time in 2 months

Pull request review commentvitejs/vite

feat: Add `ssr.noExternal = true` option

 async function restartServer(server: ViteDevServer) {   // @ts-ignore   global.__vite_start_time = Date.now()   const { port } = server.config.server-  +

Good catch!

jplhomer

comment created time in 2 months

PullRequestReviewEvent

push eventjplhomer/vite

Josh Larson

commit sha 5d3fcab8082c78e9d9af08e0f3767c7339c39488

chore: revert yarn.lock again

view details

push time in 2 months

push eventjplhomer/vite

Josh Larson

commit sha 5af8285b02202579b0d906f79da0d25dc2ef5741

chore: revert yarn.lock

view details

push time in 2 months

pull request commentvitejs/vite

feat: Add `ssr.bundleAll` option

Good call on the option usage. I've updated this PR to use ssr.noExternal = true.

jplhomer

comment created time in 2 months

push eventjplhomer/vite

Evan You

commit sha db4ba56e38a2ce7fa4a4ecf52d9eb0f375073560

fix: register files added by addWatchFile() as current module's dependency fix #3216

view details

TJ Koblentz

commit sha 9e4572edf5a21db9ed2d5ffa9c1a54dbea3687b3

fix: close vite dev server before creating new one (#4374)

view details

Evan You

commit sha c8e42d726d339c903bc4f048553a8864c69491d4

chore: remove unnecessary async

view details

OneNail

commit sha 7ad8ba242fd00595a88f5170b5b622286488859f

refactor: isCSSRequest for all css (#4484)

view details

patak

commit sha 5c2f0f004ff316b31160dcb6c24a3e3af8a9aae3

chore: minimal reproduction check in bug report (#4502)

view details

Anthony Fu

commit sha e793a915c1278cd858bad6dde561833a110849ee

chore: apply lint

view details

ygj6

commit sha 77933ba86e7b15cb32ba80c27ae707db2a598cec

fix: change the preview default mode from `development` to `production` (#4483)

view details

Alec Larson

commit sha fb406ce4c0fe6da3333c9d1c00477b2880d46352

feat: add `logger.hasErrorLogged(error)` method (#3957) Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>

view details

patak-js

commit sha 8178628b646f8e3447cbd1c55c4399277d627688

release: v2.5.0-beta.1

view details

Mestery

commit sha 66060ea8bb99ca7c27634c780999b80123c0d620

chore: KiB instead of kb unit (#4493)

view details

Romuald Brillout

commit sha 8c5ac3f89c69717b3bddedc229b77fabb9239085

feat: import `.webmanifest` assets as URL (#4515)

view details

Romuald Brillout

commit sha 420d82dc31c930fd82c28612e3dd864f35278503

fix: add missing assets to `packages/vite/client.d.ts` (#4516)

view details

Máximo Mussini

commit sha a03e94419ef4da3b842f0211536afb1501bc0919

fix: avoid crash when a file imported in SCSS does not exist (#4505)

view details

patak

commit sha 9b4fe1fa68c522878d1bdef87d7aa02ae08e986f

fix: revert update dependency slash to v4 (#4118) (#4519) This reverts commit 6017ddbc0fdeacdfd7251adb9ff4e282b39ccd5c.

view details

Hermann Stanew

commit sha 02090866103d055bcf2fff8cdbc58fbaa91ba517

docs: indentation in code block (#4522)

view details

patak

commit sha 55bcc3f0cbfe90d5b56e8beeed31794dde4a509d

docs: make link to existing integrations more prominent (#4525)

view details

Evan You

commit sha ee8ec2887e06496475bdb1e6532cc1e155a7e790

refactor: adjust custom element mode behavior custom element mode no longer exports the element constructor this change is necessary to allow defining lazy elements See https://github.com/vuejs/vue-next/issues/4261

view details

Evan You

commit sha a6f5aa74193288132ff78a3fbc3deaece6a00a8f

release: plugin-vue@1.4.0

view details

Evan You

commit sha bcb6d753234f1085061e8a6e3623a597bb961ac5

chore: plugin-vue changelog edits [ci skip]

view details

Ben McCann

commit sha 120f3b97456597998b29413e8eec5e7ad41f2e7a

feat: log a warning if dependency pre-bundling cannot be run (#4546)

view details

push time in 2 months

startedgmac/schema-stitching-handbook

started time in 2 months

pull request commentvitejs/vite

feat: Add `ssr.bundle` option

bundleAll it is! 🎉

I've also added a new playground test, ssr-webworker. It boots a custom worker server using miniflare. Only a couple assertions have been added, but it could be a useful place to debug worker-related issues in the future.

jplhomer

comment created time in 3 months

push eventjplhomer/vite

Josh Larson

commit sha 6df6f79126908819619fc395c5a3637fd04aca26

chore: Rename `bundle` to `bundleAll`

view details

Josh Larson

commit sha d96042792d5abf8f0aeaa178c15bf4125816cb45

test: add `ssr-webworker` playground tests

view details

push time in 3 months

push eventjplhomer/vite

Josh Larson

commit sha 0836179bec60cb16a453084e0f4099e63850505e

docs: Add `ssr.bundle` docs

view details

push time in 3 months

PR opened vitejs/vite

feat: Add `ssr.bundle` option

Description

This PR adds a ssr.bundle option which disables all externals during the SSR build process. This is effectively the same as manually adding all dependencies of a package to ssr.noExternal.

This is helpful when building for Workers environments like Cloudflare Workers, where require is not supported at all.

This PR also adds a check to the resolve plugin to ensure the user doesn't attempt to import any Node.js built-ins, as those wouldn't be supported in the Workers environment.

Additional context

Another option I considered was to imply this behavior from ssr.target = 'webworker'. However, that would be a breaking change, and I think it's better to be explicit in this case (maybe somebody does build a webworker runtime someday that supports require - who knows?)

Tests: I'd love to know the most effective way to test this behavior. Since it's exclusive to Worker environments, and it's only related to builds, it's tough to use the playground tests. I'd also want to test the output of the file, meaning unit tests aren't really the right way to go (unless someone can point me to an example).


What is the purpose of this pull request? <!-- (put an "X" next to an item) -->

  • [ ] Bug fix
  • [x] New Feature
  • [ ] Documentation update
  • [ ] Other

Before submitting the PR, please make sure you do the following

  • [x] Read the Contributing Guidelines.
  • [x] Read the Pull Request Guidelines and follow the Commit Convention.
  • [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • [ ] Ideally, include relevant tests that fail without this PR but pass with it.
+24 -5

0 comment

4 changed files

pr created time in 3 months