Remove autoprefixer and cssnano from oxide CLI
This commit is contained in:
parent
28e7f92a44
commit
d378bc3b5c
2 changed files with 1 additions and 24 deletions
|
|
@ -13,7 +13,6 @@ import {
|
|||
lazyCssnano,
|
||||
|
||||
// @ts-ignore
|
||||
lazyAutoprefixer,
|
||||
} from '../../../../peers/index'
|
||||
|
||||
export function lazyLightningCss() {
|
||||
|
|
@ -90,23 +89,3 @@ export function loadPostcssImport() {
|
|||
|
||||
return lazyPostcssImport()
|
||||
}
|
||||
|
||||
export function loadCssNano() {
|
||||
let options = { preset: ['default', { cssDeclarationSorter: false }] }
|
||||
|
||||
// Try to load a local `cssnano` version first
|
||||
try {
|
||||
return require('cssnano')
|
||||
} catch {}
|
||||
|
||||
return lazyCssnano()(options)
|
||||
}
|
||||
|
||||
export function loadAutoprefixer() {
|
||||
// Try to load a local `autoprefixer` version first
|
||||
try {
|
||||
return require('autoprefixer')
|
||||
} catch {}
|
||||
|
||||
return lazyAutoprefixer()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import loadPlugins from 'postcss-load-config/src/plugins' // Little bit scary, l
|
|||
import loadOptions from 'postcss-load-config/src/options' // Little bit scary, looking at private/internal API
|
||||
|
||||
import tailwind from '../../../processTailwindFeatures'
|
||||
import { loadAutoprefixer, loadCssNano, loadPostcss, loadPostcssImport, lightningcss } from './deps'
|
||||
import { loadPostcss, loadPostcssImport, lightningcss } from './deps'
|
||||
import { formatNodes, drainStdin, outputFile } from './utils'
|
||||
import { env } from '../shared'
|
||||
import resolveConfig from '../../../../resolveConfig'
|
||||
|
|
@ -303,8 +303,6 @@ export async function createProcessor(args, cliConfigPath) {
|
|||
tailwindPlugin,
|
||||
!args['--minify'] && formatNodes,
|
||||
...afterPlugins,
|
||||
!args['--no-autoprefixer'] && loadAutoprefixer(),
|
||||
args['--minify'] && loadCssNano(),
|
||||
].filter(Boolean)
|
||||
|
||||
/** @type {import('postcss').Processor} */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue