Skip to content

Commit d4e14ac

Browse files
committed
fix(fixcss): 修复寻找cache路径
1 parent f679c63 commit d4e14ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/models/Project.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ class Project {
124124
if (cssExtNames.indexOf(extName) > -1) {
125125
let name = sysPath.basename(entry[key], extName),
126126
ofp = sysPath.join(config.context, entry[key]),
127-
np = entry[key] = sysPath.resolve(this.cwd, '.cache', entry[key] + '.js'),
127+
np = entry[key] = sysPath.relative(this.cwd, sysPath.join('.cache', entry[key] + '.js')),
128128
fp = sysPath.join(config.cwd, '.cache', np);
129+
129130
mkdirp.sync(sysPath.dirname(fp));
130131
fs.writeFileSync(fp, 'require("' + sysPath.relative(sysPath.dirname(fp), ofp) + '");', 'utf-8');
131132
fps.push(fp);

0 commit comments

Comments
 (0)