Skip to content

Commit

Permalink
fix: path resolve in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
liximomo committed Jul 21, 2022
1 parent 010f9af commit 9881467
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/service/src/core/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ class Api {
}

addRuntimeFile(options: FileOptions): void {
// modify options.name to make addAppFile root as .shuvi/app/files/
options.name = path.join('app', 'files', path.resolve('/', options.name));
options.name = path.join('app', 'files', options.name);
this._projectBuilder.addFile(options);
}

Expand Down
1 change: 1 addition & 0 deletions packages/service/src/project/projectBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class ProjectBuilder {
* default path is the root path
*/
addFile(options: FileOptionsBase): void {
checkFilepath(options.name);
this._fileManager.addFile(options);
}

Expand Down

0 comments on commit 9881467

Please sign in to comment.