diff --git a/packages/cli/uni-builder/src/shared/utils.ts b/packages/cli/uni-builder/src/shared/utils.ts index 6bb799bf0a62..38d43f573973 100644 --- a/packages/cli/uni-builder/src/shared/utils.ts +++ b/packages/cli/uni-builder/src/shared/utils.ts @@ -128,6 +128,7 @@ export const getHash = (config: NormalizedEnvironmentConfig) => { return filenameHash ? '.[contenthash:8]' : ''; }; +// TODO(@vegerot): update this to `['defaults']` for next breaking change release const DEFAULT_WEB_BROWSERSLIST = ['> 0.01%', 'not dead', 'not op_mini all']; const DEFAULT_BROWSERSLIST: Record = { diff --git a/packages/document/main-doc/docs/en/guides/advanced-features/page-performance/optimize-bundle.mdx b/packages/document/main-doc/docs/en/guides/advanced-features/page-performance/optimize-bundle.mdx index 8aa10c3ab762..4218adad92e9 100644 --- a/packages/document/main-doc/docs/en/guides/advanced-features/page-performance/optimize-bundle.mdx +++ b/packages/document/main-doc/docs/en/guides/advanced-features/page-performance/optimize-bundle.mdx @@ -46,16 +46,12 @@ See the [performance.bundleAnalyze](/configure/app/performance/bundle-analyze.ht Modern.js will compile the code according to the project's Browserslist config, and inject some Polyfills. If the project does not need to be compatible with legacy browsers, you can adjust the Browserslist and drop some legacy browsers, thereby reducing the compilation overhead on syntax and polyfill. -Modern.js's default Browserslist config is: +Modern.js's projects are created with the [default](https://github.com/browserslist/browserslist/blob/7b0ff670e997c53b13d44e2150ab09807a20ed6b/index.js#L477) Browserslist config. -```js -['> 0.01%', 'not dead', 'not op_mini all']; -``` - -For example, if you only need to be compatible with browsers above Chrome 61, you can change it to: +For example, if you only need to be compatible with the latest Chrome versions, you can change it to: ```js -['Chrome >= 61']; +['last 2 chrome versions']; ``` :::tip diff --git a/packages/generator/generators/mwa-generator/templates/base-template/.browserslistrc.handlebars b/packages/generator/generators/mwa-generator/templates/base-template/.browserslistrc.handlebars index f5ceef6bb8ec..95b1f533f55d 100644 --- a/packages/generator/generators/mwa-generator/templates/base-template/.browserslistrc.handlebars +++ b/packages/generator/generators/mwa-generator/templates/base-template/.browserslistrc.handlebars @@ -1,5 +1,3 @@ -chrome >= 51 -edge >= 15 -firefox >= 54 -safari >= 10 -ios_saf >= 10 +# > 0.5%, last 2 versions, Firefox ESR, not dead + +defaults diff --git a/packages/toolkit/utils/src/cli/get/data.ts b/packages/toolkit/utils/src/cli/get/data.ts index fe09ca4d41be..d78a2f6d6eac 100644 --- a/packages/toolkit/utils/src/cli/get/data.ts +++ b/packages/toolkit/utils/src/cli/get/data.ts @@ -55,6 +55,7 @@ export const getAntdMajorVersion = (appDirectory: string) => { } }; +// TODO(@vegerot): update this to `['defaults']` for next breaking change release export const defaults = ['> 0.01%', 'not dead', 'not op_mini all']; export const getBrowserslist = (appDirectory: string) =>