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

refactor: esm webpack #4942

Merged
merged 2 commits into from
Feb 19, 2024
Merged

refactor: esm webpack #4942

merged 2 commits into from
Feb 19, 2024

Conversation

kyranjamie
Copy link
Collaborator

@kyranjamie kyranjamie commented Feb 14, 2024

Try out this version of Leather — Extension build, Test report

This PR migrates the extension to an ES Module, "type": "module". This means that node expects all *.js files to be modules, unless otherwise stated by the *.cjs file extension. I've migrated most configs over to ESM, bar those causing issues or not worth the time, eslint, webpack modules for test app.

These changes make it easier to import from the monorepo with modern tooling.

We don't allow export default in our app for a handful of reasons, but you'll see it here and many configs expect a default export.

More info here, recommended reading https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

@kyranjamie kyranjamie force-pushed the experimental/use-esm branch 7 times, most recently from 4823ccc to 682a5a7 Compare February 15, 2024 12:49
@kyranjamie kyranjamie marked this pull request as ready for review February 15, 2024 12:55
src/inpage/inpage.ts Show resolved Hide resolved
webpack/dev-server.js Outdated Show resolved Hide resolved
@kyranjamie kyranjamie force-pushed the experimental/use-esm branch 2 times, most recently from b9e403a to a2be79e Compare February 15, 2024 14:24
@kyranjamie kyranjamie added this pull request to the merge queue Feb 19, 2024
Merged via the queue into dev with commit c49f7e9 Feb 19, 2024
28 checks passed
@kyranjamie kyranjamie deleted the experimental/use-esm branch February 19, 2024 10:38
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.

4 participants