Skip to content

Commit 3a5075e

Browse files
authored
fix: allow absolute paths (#96)
1 parent 032232c commit 3a5075e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/module.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function nuxtPurgeCss (moduleOptions) {
3737
const { mode, enabled, ...config } = Object.assign({}, DEFAULTS, mergedConfig)
3838

3939
// transform relative paths
40-
config.paths = glob.sync(config.paths.map(p => path.join(srcDir, p)))
40+
config.paths = glob.sync(config.paths.map(p => path.isAbsolute(p) ? p : path.join(srcDir, p)))
4141

4242
if (!enabled) {
4343
const msg = this.options.dev ? 'PurgeCSS is not enabled because you are in dev mode' : 'Module is not enabled'

0 commit comments

Comments
 (0)