Skip to content

Commit

Permalink
fix: 기본 오브젝트 가져오지 못하는 이슈 수정
Browse files Browse the repository at this point in the history
TODO : 오브젝트 import관련 전반적인 검토 필요
  • Loading branch information
Tnks2U committed Apr 20, 2023
1 parent ff991bb commit e134b44
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions src/main/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ export default class {
result = result
.replace('./bower_components', '../../../node_modules')
.replace('entryjs', 'entry-js'); // 과거 웹 WS 대응
} else if (result.startsWith('/lib')) { // 신규 웹 기본 오브젝트 대응
result = result.replace('/lib', '../../../node_modules');
} else if (result.indexOf('temp') > -1) { // 일반 오브젝트 대응
result = result.substring(result.indexOf('temp'));
result = path.join(this.appPath, result)
.replace(/\\/gi, '/');
}

if (fileUrl.endsWith('.svg')) {
// svg 파일의 경우 png 파일로 교체한다.
result = result.replace('.svg', '.png');
}
// TODO: 히스토리 파악 후 완전 제거
// if (fileUrl.endsWith('.svg')) {
// // svg 파일의 경우 png 파일로 교체한다.
// result = result.replace('.svg', '.png');
// }

result = result.replace(/.*\/\//, ''); // 외부 접속 프로토콜 스키마 보안 대응
return result;
Expand Down Expand Up @@ -72,6 +75,27 @@ export default class {
'./bower_components/entryjs/images/media/entrybot2.png',
'./bower_components/entry-js/images/_1x1.png',
'./bower_components/entryjs/images/_1x1.png',

'./bower_components/entry-js/images/media/entrybot1.svg',
'./bower_components/entryjs/images/media/entrybot1.svg',
'./bower_components/entry-js/images/media/entrybot2.svg',
'./bower_components/entryjs/images/media/entrybot2.svg',
'./bower_components/entry-js/images/_1x1.svg',
'./bower_components/entryjs/images/_1x1.svg',

'./lib/entry-js/images/media/entrybot1.png',
'./lib/entryjs/images/media/entrybot1.png',
'./lib/entry-js/images/media/entrybot2.png',
'./lib/entryjs/images/media/entrybot2.png',
'./lib/entry-js/images/_1x1.png',
'./lib/entryjs/images/_1x1.png',

'./lib/entry-js/images/media/entrybot1.svg',
'./lib/entryjs/images/media/entrybot1.svg',
'./lib/entry-js/images/media/entrybot2.svg',
'./lib/entryjs/images/media/entrybot2.svg',
'./lib/entry-js/images/_1x1.svg',
'./lib/entryjs/images/_1x1.svg',
];
}

Expand Down

0 comments on commit e134b44

Please sign in to comment.