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

Fix Webpack compatibility #29

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Fix Webpack compatibility #29

merged 1 commit into from
Nov 15, 2021

Conversation

shoonia
Copy link
Contributor

@shoonia shoonia commented Nov 14, 2021

Hey!

I use this library in my browser App. The webpack can't build the browser app with import (or I don't found how):

import {createRequire} from 'node:module';

const require = createRequire(import.meta.url);

May you change the way of import without createRequire ?

@sindresorhus
Copy link
Owner

Hmm, I had an error when using import with this, but it seems to work now. Weird.

@sindresorhus sindresorhus changed the title Save the browser support Fix Webpack compatibility Nov 15, 2021
@sindresorhus sindresorhus merged commit 6e9fa80 into sindresorhus:main Nov 15, 2021
@shoonia
Copy link
Contributor Author

shoonia commented Nov 15, 2021

There is a small hack )

- const lines = new LinesAndColumns(string);
+ const lines = new LinesAndColumns.default(string);

Thanks!

SmushyTaco pushed a commit to SmushyTaco/parse-json that referenced this pull request Jan 15, 2025
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.

2 participants