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

fix: avoid top-level warnings of esbuild #5447

Merged
merged 2 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/vite-service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 2.1.4

- [fix] avoid top-level warning of esbuild.

## 2.1.3

- [feat] be able to resolve `.mts`
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@builder/vite-service",
"version": "2.1.3",
"version": "2.1.4",
"description": "vite implementation",
"author": "ice-admin@alibaba-inc.com",
"homepage": "",
Expand Down
4 changes: 4 additions & 0 deletions packages/vite-service/src/wp2vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export const wp2vite = (context: Context): InlineConfig => {
let viteConfig: Partial<Record<keyof Option, any>> = {
configFile: false,
root: rootDir,
esbuild: {
// Fix https://github.com/alibaba/ice/issues/5401
logOverride: { 'this-is-undefined-in-esm': 'silent' },
},
// ice 开发调试时保证 cjs 依赖转为 esm 文件
plugins: [
!commandArgs?.disableMock && userConfig.mock && mockPlugin((userConfig.mock as { exclude?: string[]})?.exclude),
Expand Down
Loading