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

Add Remix/ESBuild support by checking the _debugOwner._debugSource #73

Merged
merged 7 commits into from
Nov 25, 2023

Conversation

HosseinAgha
Copy link
Contributor

@HosseinAgha HosseinAgha commented May 15, 2023

As Remix/ESBuild _debugSource filepaths are relative I had to also add GaitanK's code in order to make path absolute in my Remix app.

ESBuild has added _debugSource for a long time now evanw/esbuild#2318 but looks like at least in React 18 we need to read it from somewhere else.

@ericclemmons, happy to have your feedback on this.

@changeset-bot
Copy link

changeset-bot bot commented May 15, 2023

🦋 Changeset detected

Latest commit: d62564c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
click-to-react-component Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@HosseinAgha HosseinAgha marked this pull request as ready for review May 15, 2023 18:58
@HosseinAgha HosseinAgha changed the title Adds remix/esbuild support by checking the _debugOwner._debugSource Add remix/esbuild support by checking the _debugOwner._debugSource May 15, 2023
@HosseinAgha HosseinAgha changed the title Add remix/esbuild support by checking the _debugOwner._debugSource Add Remix/esbuild support by checking the _debugOwner._debugSource May 15, 2023
@HosseinAgha HosseinAgha changed the title Add Remix/esbuild support by checking the _debugOwner._debugSource Add Remix/ESBuild support by checking the _debugOwner._debugSource May 15, 2023
@HosseinAgha HosseinAgha mentioned this pull request May 16, 2023
@maxxborer
Copy link

maxxborer commented Oct 29, 2023

Will remix support be accepted? PR is already half a year old, are there any problems with this?

Also in the latest remix version (2.1.0) I get:

/node_modules/cliui/build/index.cjs:291
const stringWidth = require('string-width');
                    ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /node_modules/string-width/index.js from /node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.

@maxxborer
Copy link

Will remix support be accepted? PR is already half a year old, are there any problems with this?

Also in the latest remix version (2.1.0) I get:

/node_modules/cliui/build/index.cjs:291
const stringWidth = require('string-width');
                    ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /node_modules/string-width/index.js from /node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.

oops, I added click-to-react-component to serverDependenciesToBundle in remix.config.js and everything worked.

@ericclemmons ericclemmons merged commit 9246a89 into ericclemmons:main Nov 25, 2023
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

3 participants