Skip to content

Commit

Permalink
fix: 윈도우에서 / 작동하지 않는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
ghdtjgus76 committed Jun 12, 2024
1 parent 0dc5dc1 commit 1419a66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/scripts/generateBuildConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ const getFilteredComponentFiles = async (directoryPath: string) => {
};

const createPaths = (type: "entryFile" | "exports", file: string) => {
const componentDirName = file.split("/")[0] ?? "";
const componentName = file.split("/")[1]?.slice(0, -4) ?? "";
const defaultComponent = file.endsWith("index.tsx");
const parsedPath = path.parse(file);
const componentDirName = parsedPath.dir.split(path.sep)[0] ?? "";
const componentName = parsedPath.name;
const defaultComponent = componentName === "index";

const typesPath = `./dist/components/${componentDirName}/${defaultComponent ? "index" : componentName}.d.ts`;
const importPath = `./dist/${defaultComponent ? componentDirName : componentName}.js`;
Expand Down

0 comments on commit 1419a66

Please sign in to comment.