-
Notifications
You must be signed in to change notification settings - Fork 0
pite에서 사용중인 caniuse-lite버전을 빌드시 로그에 보여주도록 수정 #50
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
base: main
Are you sure you want to change the base?
Conversation
✅ Changeset detectedLatest commit: 63bfb2a
If no version change is needed, please add The changes in this PR will be included in the next version bump. powered by: naverpay changeset detect-add actions |
2f1531e to
8a61b4a
Compare
2-one-week
left a comment
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.
프린트!
| @@ -0,0 +1,14 @@ | |||
| /* eslint-disable no-console */ | |||
| import packageJsonContent from 'browserslist/package.json' with {type: 'json'} | |||
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.
요거 버전 지원만 한번 확인 부탁드립니다
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.
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.
TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "file:///Users/USER/Workspace/npay/pie/node_modules/.pnpm/browserslist@4.24.4/node_modules/browserslist/package.json" needs an import attribute of "type: json"
으음.. 지금 방식으로는 이 에러가 발생하네요
정식으로(?) import하는게 아니라 강제로 파일을 읽어와 파싱하는 형태로 해야할 것 같습니다
| "@rollup/plugin-babel": "^6.0.4", | ||
| "babel-plugin-polyfill-corejs3": "^0.11.0", | ||
| "browserslist": "^4.24.2", | ||
| "browserslist": "4.24.4", |
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.
혹시 요거 궁금한게 있는데 사용처의 pkg 내부의 browserslist가 아니라 pite의 browserslist/caniuse-lite 의 버전을 바라보는걸까요~?
궁금했던 게 만약 outdated되면 pite를 주기적으로 업데이트해줘야 하는 구조인가 싶어서 여쭙습니다..!
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.
원래 의도했던건 pite 빌드시 참고하는 caniuse-lite버전을 알려주고, 사용처에서는 사용처가 참고하는 버전을 알아서 획득(?)해 버전을 맞추는 것을 생각했습니다. 제작자(우리)의 타겟과 사용처의 타겟이 다를 수 있으니 우리가 작업하며 의도했던 타겟에 대한 힌트를 제공하는 정도의 기능을 생각했습니다.
궁금했던 게 만약 outdated되면 pite를 주기적으로 업데이트해줘야 하는 구조인가 싶어서 여쭙습니다..!
그래서 꼭 주기적으로 업데이트할 필요는 없고 지금 설치한 pite가 어떤 버전을 타겟으로 작업되었나 참고하고 필요하다면 업데이트 하는 그림을 생각했습니다. 어차피 사용처의 caniuse-lite버전 따라서 빌드될테니 크게 중요한 정보가 아니기도 하구요..!
그런데 말씀주신거 생각해보니 뭔가 로그가 사용처의 caniuse-lite버전을 알려주는 것으로 보일 것 같아서,, 사용처의 정보도 함께 로그에 보여주는 식으로 방향을 조금 바꿔야하나 고민이 되는군요..
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.
아하 그러면 pite로 코드를 빌드하는 시점에는 pite > browserslist > caniuse-lite 버전을 쓰는 게 아니라 사용처에 browerslist가 따로 설치되어 있다면 그 버전을 쓰는거죠~?? (즉, 사용처의 caniuse-lite 버전에 따라 browserslistToEsbuild(browserslist)로 타겟 결정됨)
뭔가 browserslist가 peerDeps가 아니라 deps라서 제가 햇갈렸던거 같습니다 😅

Related Issue
Describe your changes
Request