-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add CSS autoprefixing support based on build env (#2)
- Loading branch information
1 parent
5e66c65
commit e070ff6
Showing
4 changed files
with
473 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const DEVELOPMENT = ['Chrome >= 67']; | ||
|
||
const PRODUCTION = [ | ||
'last 2 versions', | ||
'last 4 years', | ||
'Chrome >= 54', | ||
'ChromeAndroid >= 54', | ||
'IE >= 11', | ||
'Edge >= 15', | ||
'Firefox >= 51', | ||
'iOS >= 9', | ||
'Safari >= 10', | ||
]; | ||
|
||
const NONE = []; | ||
|
||
/** | ||
* @param {Object} options | ||
* @param {String} options.mode | ||
*/ | ||
function getBrowserslist(options) { | ||
switch (options.mode) { | ||
case 'development': { | ||
return DEVELOPMENT; | ||
} | ||
|
||
case 'production': { | ||
return PRODUCTION; | ||
} | ||
|
||
default: { | ||
return NONE; | ||
} | ||
} | ||
} | ||
|
||
module.exports = { | ||
getBrowserslist, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.