fix: path doesn't work well on client
This commit is contained in:
parent
f14493b61b
commit
ed5d70bfec
|
@ -3,8 +3,6 @@ import path from 'path';
|
||||||
|
|
||||||
import {Resource} from './resource';
|
import {Resource} from './resource';
|
||||||
|
|
||||||
const RESOURCE_PATH = path.resolve(process.cwd(), 'resource');
|
|
||||||
|
|
||||||
export class ResourceRegistry {
|
export class ResourceRegistry {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -23,6 +21,7 @@ export class ResourceRegistry {
|
||||||
}
|
}
|
||||||
|
|
||||||
flush() {
|
flush() {
|
||||||
|
const RESOURCE_PATH = path.resolve(process.cwd(), 'resource');
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
path.join(RESOURCE_PATH, 'registry.json'),
|
path.join(RESOURCE_PATH, 'registry.json'),
|
||||||
JSON.stringify(this.uriToOtherMap)
|
JSON.stringify(this.uriToOtherMap)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user