@xfilecom/xframe 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/xframe.js
CHANGED
|
@@ -400,27 +400,27 @@ function patchWebTsconfigFrontCorePath(targetRoot) {
|
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
/**
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
];
|
|
408
|
-
const SCAFFOLD_VITE_FRONT_CORE =
|
|
409
|
-
"path.resolve(__dirname, '../../node_modules/@xfilecom/front-core')";
|
|
410
|
-
|
|
403
|
+
/**
|
|
404
|
+
* Vite 에서 @xfilecom/front-core 를 node_modules 패키지 "루트"만 alias 하면
|
|
405
|
+
* `tokens.css` 같은 서브패스가 exports 를 타지 못해 깨짐 → alias 제거 후 npm 기본 해석.
|
|
406
|
+
*/
|
|
411
407
|
function patchWebViteFrontCoreAlias(targetRoot) {
|
|
412
408
|
for (const sub of ['client', 'admin']) {
|
|
413
409
|
const p = path.join(targetRoot, 'web', sub, 'vite.config.ts');
|
|
414
410
|
if (!fs.existsSync(p)) continue;
|
|
415
|
-
let
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
411
|
+
let s = fs.readFileSync(p, 'utf8');
|
|
412
|
+
const orig = s;
|
|
413
|
+
s = s.replace(/\s*'@xfilecom\/front-core':\s*frontCoreSrc,\s*\r?\n/, '\n');
|
|
414
|
+
s = s.replace(
|
|
415
|
+
/\r?\n\/\*\*[\s\S]*?front-core[\s\S]*?\*\/\s*\r?\nconst frontCoreSrc = path\.resolve\([^;]+\);\s*/m,
|
|
416
|
+
'\n',
|
|
417
|
+
);
|
|
418
|
+
s = s.replace(/\r?\nconst frontCoreSrc = path\.resolve\([^;]+\);\s*/g, '\n');
|
|
419
|
+
if (s.includes('frontCoreSrc')) {
|
|
420
|
+
continue;
|
|
421
421
|
}
|
|
422
|
-
if (
|
|
423
|
-
fs.writeFileSync(p,
|
|
422
|
+
if (s !== orig) {
|
|
423
|
+
fs.writeFileSync(p, s, 'utf8');
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
}
|
package/defaults.json
CHANGED
package/package.json
CHANGED
|
@@ -8,8 +8,8 @@ import react from '@vitejs/plugin-react';
|
|
|
8
8
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* (`npx @xfilecom/xframe <dir>`
|
|
11
|
+
* xframe 레포 안 템플릿: …/packages/xframe/packages/front-core/src
|
|
12
|
+
* (`npx @xfilecom/xframe <dir>` 생성 시 CLI 가 front-core alias·const 를 제거 → npm exports 로 해석)
|
|
13
13
|
*/
|
|
14
14
|
const frontCoreSrc = path.resolve(__dirname, '../../../..', 'front-core', 'src');
|
|
15
15
|
|
|
@@ -8,8 +8,8 @@ import react from '@vitejs/plugin-react';
|
|
|
8
8
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* (`npx @xfilecom/xframe <dir>`
|
|
11
|
+
* xframe 레포 안 템플릿: …/packages/xframe/packages/front-core/src
|
|
12
|
+
* (`npx @xfilecom/xframe <dir>` 생성 시 CLI 가 front-core alias·const 를 제거 → npm exports 로 해석)
|
|
13
13
|
*/
|
|
14
14
|
const frontCoreSrc = path.resolve(__dirname, '../../../..', 'front-core', 'src');
|
|
15
15
|
|