mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Use path.resolve instead of string concatenation
This allows the path to be statically analysed when bundling, for example with `pkg`
This commit is contained in:
parent
ee0f32908d
commit
5b4baea1d6
@ -1,4 +1,5 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import postcss from 'postcss'
|
||||
import createUtilityPlugin from './util/createUtilityPlugin'
|
||||
import buildMediaQuery from './util/buildMediaQuery'
|
||||
@ -363,7 +364,9 @@ export let variantPlugins = {
|
||||
|
||||
export let corePlugins = {
|
||||
preflight: ({ addBase }) => {
|
||||
let preflightStyles = postcss.parse(fs.readFileSync(`${__dirname}/css/preflight.css`, 'utf8'))
|
||||
let preflightStyles = postcss.parse(
|
||||
fs.readFileSync(path.resolve(__dirname, 'css/preflight.css'), 'utf8')
|
||||
)
|
||||
|
||||
addBase([
|
||||
postcss.comment({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user