Skip to content

Commit f24e605

Browse files
committed
fix: use path.resolve or path.join based on typeof __NCC__
1 parent 79671b1 commit f24e605

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5179,7 +5179,9 @@ module.exports = {
51795179

51805180
const path = __nccwpck_require__(1017)
51815181

5182-
const CACHE_DIR = path.resolve('..', 'cache')
5182+
const CACHE_DIR = (typeof __NCC__ !== 'undefined')
5183+
? path.resolve('..', 'cache')
5184+
: path.join(__dirname, '..', 'cache')
51835185

51845186
module.exports = {
51855187
security: {

src/store.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const path = require('path')
22

3-
const CACHE_DIR = path.resolve('..', 'cache')
3+
const CACHE_DIR = (typeof __NCC__ !== 'undefined')
4+
? path.resolve('..', 'cache')
5+
: path.join(__dirname, '..', 'cache')
46

57
module.exports = {
68
security: {

0 commit comments

Comments
 (0)