Skip to content

Commit f679c63

Browse files
committed
fix(fixCss): 修复在不同context下.cache路径问题
1 parent c91715d commit f679c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/models/Project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ 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.join('../.cache', entry[key] + '.js'),
127+
np = entry[key] = sysPath.resolve(this.cwd, '.cache', entry[key] + '.js'),
128128
fp = sysPath.join(config.cwd, '.cache', np);
129129
mkdirp.sync(sysPath.dirname(fp));
130130
fs.writeFileSync(fp, 'require("' + sysPath.relative(sysPath.dirname(fp), ofp) + '");', 'utf-8');

0 commit comments

Comments
 (0)