mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Extended "overrideBrowserslist" option to support environment maps (#37642)
This commit is contained in:
parent
35ea72f220
commit
a5200306f9
@ -16,5 +16,22 @@ const ap2: Transformer = autoprefixer({
|
||||
flexbox: true,
|
||||
grid: false,
|
||||
stats: {},
|
||||
ignoreUnknownVersions: false
|
||||
ignoreUnknownVersions: false,
|
||||
});
|
||||
|
||||
// Using environment map in "overrideBrowserslist"
|
||||
const ap3: Transformer = autoprefixer({
|
||||
overrideBrowserslist: {
|
||||
production: [
|
||||
'> 1%',
|
||||
'ie 10',
|
||||
],
|
||||
modern: [
|
||||
'last 1 chrome version',
|
||||
'last 1 firefox version',
|
||||
],
|
||||
ssr: [
|
||||
'node 12',
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
8
types/autoprefixer/index.d.ts
vendored
8
types/autoprefixer/index.d.ts
vendored
@ -1,6 +1,8 @@
|
||||
// Type definitions for autoprefixer 9.6
|
||||
// Project: https://github.com/postcss/autoprefixer
|
||||
// Definitions by: Armando Meziat <https://github.com/odnamrataizem>, murt <https://github.com/murt>
|
||||
// Definitions by: Armando Meziat <https://github.com/odnamrataizem>
|
||||
// murt <https://github.com/murt>
|
||||
// Slava Fomin II <https://github.com/slavafomin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
@ -8,6 +10,8 @@ import { Plugin } from 'postcss';
|
||||
import { Stats } from 'browserslist';
|
||||
|
||||
declare namespace autoprefixer {
|
||||
type BrowserslistTarget = (string | string[] | { [key: string]: string[]; });
|
||||
|
||||
interface Options {
|
||||
env?: string;
|
||||
cascade?: boolean;
|
||||
@ -18,7 +22,7 @@ declare namespace autoprefixer {
|
||||
grid?: false | 'autoplace' | 'no-autoplace';
|
||||
stats?: Stats;
|
||||
browsers?: string[] | string;
|
||||
overrideBrowserslist?: string[] | string;
|
||||
overrideBrowserslist?: BrowserslistTarget;
|
||||
ignoreUnknownVersions?: boolean;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user