Jordan Pittman a1346c9a8e
Don't rewrite source maps for @layer rules (#8971)
* Cleanup

* Don’t rewrite source maps for `@layer` rules

* Update changelog
2022-07-27 12:19:08 -04:00

34 lines
752 B
JavaScript

import path from 'path'
import postcss from 'postcss'
import tailwind from '../../src'
export * from './strings'
export * from './defaults'
export let map = JSON.stringify({
version: 3,
file: null,
sources: [],
names: [],
mappings: '',
})
export function run(input, config, plugin = tailwind) {
let { currentTestName } = expect.getState()
return postcss(plugin(config)).process(input, {
from: `${path.resolve(__filename)}?test=${currentTestName}`,
})
}
export function runWithSourceMaps(input, config, plugin = tailwind) {
let { currentTestName } = expect.getState()
return postcss(plugin(config)).process(input, {
from: `${path.resolve(__filename)}?test=${currentTestName}`,
map: {
prev: map,
},
})
}