Skip to content

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