-
Notifications
You must be signed in to change notification settings - Fork 117
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
feat: testing branch for ESM-only packages [] #1526
base: feat/esm-only
Are you sure you want to change the base?
Conversation
|
||
const baseConfig = require('../../baseJestConfig'); | ||
const packageJSON = require('./package.json'); | ||
const packageName = packageJSON.name.split('@contentful/')[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: depending on your preference
const packageName = packageJSON.name.split('@contentful/')[1]; | |
const packageName = packageJSON.name.replace('@contentful/', ''); |
"types": "dist/types/index.d.ts", | ||
"exports": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need them or not?
I saw some post where it was mentioned that it was required for pure esm
other post are not mentioning them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andipaetzold going to tag you on this comment if that's okay? I don't think we need it, I've tested this in the web app and it works, but have also seen some articles recommending to have it in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't need it
@@ -4,10 +4,10 @@ import { json } from '@codemirror/lang-json'; | |||
import { indentUnit } from '@codemirror/language'; | |||
import { EditorView } from '@codemirror/view'; | |||
import tokens from '@contentful/f36-tokens'; | |||
import CodeMirror from '@uiw/react-codemirror'; | |||
import CodeMirror from '@uiw/react-codemirror/esm/index.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ why do we need to import from esm
Shouldn't be automatically detected?
67fa702
to
1e6cdb6
Compare
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
"type": "module", | ||
"main": "dist/esm/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package stores the files in dist/esm
while boolean
stores them in dist
directly. Can we align the setups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense will do!
Marking pull request as stale since there was no activity for 30 days |
Strategy