-
Notifications
You must be signed in to change notification settings - Fork 273
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: fix type: "module" must need js file extensions #1921
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughThe recent updates to the Changes
Suggested labels
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
[e2e-test-warn] The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug". Please make sure you've read our contributing guide |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/renderless/build.config.ts (1 hunks)
- packages/renderless/package.json (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/renderless/build.config.ts
Additional comments not posted (2)
packages/renderless/package.json (2)
33-33
: Verify the build process withunbuild
.The build script has been updated to use
unbuild
. Ensure that the build process works correctly with this new tool and that all configurations are properly set.Verification successful
Unbuild configuration is correctly set up.
The
build.config.ts
file shows a straightforward configuration forunbuild
, usingmkdist
with an entry point in./src/
and enabling theclean
option. This setup appears to be correct for transitioning fromtsup
tounbuild
. Ensure that the build process works as expected with this configuration.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the build process using `unbuild`. # Test: Run the build command and check for successful completion. pnpm buildLength of output: 84
Script:
#!/bin/bash # Search for any configuration files or scripts related to `unbuild`. fd -e json -e js -e ts -e yaml -e yml | xargs grep -i "unbuild" || trueLength of output: 264
Script:
#!/bin/bash # Display the contents of the `build.config.ts` file to review the `unbuild` configuration. cat packages/renderless/build.config.tsLength of output: 215
44-44
: Ensureunbuild
is correctly installed and configured.The
devDependencies
now includeunbuild
. Verify thatunbuild
is correctly installed and configured in the project.Verification successful
unbuild
is correctly configured and used in the project.The
unbuild
package is referenced in thebuild
script withinpackage.json
and is imported inbuild.config.ts
, indicating it is set up for building the project.
packages/renderless/package.json
:"build": "unbuild"
packages/renderless/build.config.ts
:import { defineBuildConfig } from 'unbuild'
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the installation and configuration of `unbuild`. # Test: Check if `unbuild` is installed and accessible. pnpm list unbuildLength of output: 91
Script:
#!/bin/bash # Description: Search for `unbuild` references in configuration files to verify its configuration. # Search for `unbuild` in package.json and other configuration files. rg 'unbuild' package.jsonLength of output: 25
Script:
#!/bin/bash # Description: Search for `unbuild` references across all files to verify its configuration. # Search for `unbuild` in all files to find any references or configurations. rg 'unbuild'Length of output: 206
reuse tsup to generate dts
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/renderless/build.config.ts (1 hunks)
- packages/renderless/package.json (2 hunks)
- packages/renderless/tsup.config.ts (0 hunks)
Files not reviewed due to no reviewable changes (1)
- packages/renderless/tsup.config.ts
Additional comments not posted (5)
packages/renderless/build.config.ts (1)
1-17
: The build configuration looks good, but consider generating type declaration files.The build configuration using
unbuild
follows the package conventions and looks correct. The use ofmkdist
builder,esbuild
options, andclean
option are appropriate for building a distribution package.However, based on the past review comments, there seems to be a concern about generating type declaration files using
unbuild
. It's important to ensure that the type declaration files are generated correctly for better type safety and developer experience.packages/renderless/package.json (4)
33-33
: LGTM!The change to the
build
script is a good improvement. It separates the code building and type definition generation processes, allowing for more granular control and a cleaner build output.
34-34
: LGTM!The introduction of the
build:code
script usingunbuild
is a good change. It aligns with the restructuring of the build process and should improve the build performance.
35-35
: LGTM!The introduction of the
build:dts
script usingtsup
is a good change. It aligns with the restructuring of the build process and should ensure that the type definitions are generated correctly.
47-47
: LGTM!The addition of the
unbuild
package to thedevDependencies
section is consistent with the introduction of thebuild:code
script. The version constraint^2.0.0
is reasonable and should allow for minor and patch updates to the package.
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
missing js file extensions on import statement
Issue Number: #569
What is the new behavior?
generated renderless file import statement could contains js file extensions
cd packages/renderless
run
pnpm build
Does this PR introduce a breaking change?
Other information
Better than #1880
Summary by CodeRabbit
New Features
Bug Fixes