UNPKG
@pandabox/unplugin
Version:
latest (0.2.2)
0.2.2
0.2.1
0.2.0
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.2
0.0.1
0.0.0
Panda CSS as a Vite/Rollup/Webpack/Esbuild plugin
astahmer.dev
astahmer/pandabox
@pandabox/unplugin
/
src
/
plugin
/
ensure-absolute.ts
4 lines
(3 loc)
•
169 B
text/typescript
View Raw
1
2
3
4
import { isAbsolute, resolve } from
'path'
export const ensureAbsolute = (
path
:
string
, root:
string
) =>
path
? (isAbsolute(
path
) ?
path
: resolve(root,
path
)) : root