Files
OfficialSite/build/utils/postcss.js
Chauncey McAskill 6ded72bc79 Refactor postcss.js
Moved creation of Processor from utility file to styles.js to allow for future customization of `postcss` and `autoprefixer`.
2021-11-03 10:49:35 -04:00

26 lines
477 B
JavaScript

/**
* @file If available, returns the PostCSS Processor creator and
* any the Autoprefixer PostCSS plugin.
*/
let postcss, autoprefixer;
try {
postcss = await import('postcss');
postcss = postcss.default;
autoprefixer = await import('autoprefixer');
autoprefixer = autoprefixer.default;
} catch (err) {
postcss = null;
autoprefixer = null;
}
export default postcss;
export const plugins = [
autoprefixer,
];
export {
autoprefixer
};