2021-09-15 17:29:07 -04:00
|
|
|
/**
|
2021-09-21 17:30:48 -04:00
|
|
|
* @file If available, returns the PostCSS Processor creator and
|
|
|
|
|
* any the Autoprefixer PostCSS plugin.
|
2021-09-15 17:29:07 -04:00
|
|
|
*/
|
|
|
|
|
|
2021-09-21 17:30:48 -04:00
|
|
|
let postcss, autoprefixer;
|
|
|
|
|
|
2021-09-16 18:01:16 -04:00
|
|
|
try {
|
2021-09-21 17:30:48 -04:00
|
|
|
postcss = await import('postcss');
|
|
|
|
|
postcss = postcss.default;
|
2021-09-15 17:29:07 -04:00
|
|
|
|
2021-09-21 17:30:48 -04:00
|
|
|
autoprefixer = await import('autoprefixer');
|
|
|
|
|
autoprefixer = autoprefixer.default;
|
2021-09-16 18:01:16 -04:00
|
|
|
} catch (err) {
|
2021-09-21 17:30:48 -04:00
|
|
|
postcss = null;
|
|
|
|
|
autoprefixer = null;
|
2021-09-16 18:01:16 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default postcss;
|
2021-09-21 17:33:32 -04:00
|
|
|
export const pluginsList = [
|
2021-09-21 17:30:48 -04:00
|
|
|
autoprefixer,
|
|
|
|
|
];
|
2021-09-21 17:33:32 -04:00
|
|
|
export const pluginsMap = {
|
|
|
|
|
'autoprefixer': autoprefixer,
|
|
|
|
|
};
|
2021-09-21 17:30:48 -04:00
|
|
|
export {
|
|
|
|
|
autoprefixer
|
|
|
|
|
};
|