vite icon indicating copy to clipboard operation
vite copied to clipboard

fix(optimize-deps): don't externalize JS files imported with asset extensions

Open proc07 opened this issue 1 year ago • 4 comments

Description

fix #16116 importing a CommonJS module installed from NPM. The modue contains files with filenames like PeoplePicker.scss.js. These are JavaScript files, obviously, but the filename contains scss.


What is the purpose of this pull request?

  • [X] Bug fix
  • [ ] New Feature
  • [ ] Documentation update
  • [ ] Other

proc07 avatar Mar 23 '24 02:03 proc07

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Thanks. Would you add a test case in playground/optimize-deps?

sure, I'll add a test case

proc07 avatar Mar 24 '24 07:03 proc07

@sapphi-red hi, I have submitted the test code, but how does the Actions check failing

proc07 avatar Mar 24 '24 10:03 proc07

I guess you forgot to run pnpm i after adding a local package.

sapphi-red avatar Mar 24 '24 10:03 sapphi-red