Skip to content

Commit

Permalink
fix: wow-ui wow-icons tsc-alias 사용하도록 설정 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ghdtjgus76 committed Jun 8, 2024
1 parent e581d69 commit bbbda4d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
8 changes: 4 additions & 4 deletions packages/wow-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/react/index.d.ts",
"types": "./dist/component/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"scripts": {
"build": "pnpm generate:icons && rm -rf dist && rollup -c --bundleConfigAsCjs && tsc --emitDeclarationOnly",
"build": "pnpm generate:icons && rm -rf dist && rollup -c --bundleConfigAsCjs && tsc-alias",
"generate:icons": "tsx ../scripts/generateReactComponentFromSvg.ts && pnpm format && pnpm lint",
"lint": "eslint --fix ./src/react/**/*.tsx",
"format": "prettier --write ./src/react/**/*"
"lint": "eslint --fix ./src/component/**/*.tsx",
"format": "prettier --write ./src/component/**/*"
},
"keywords": [],
"author": "gdsc-hongik",
Expand Down
12 changes: 11 additions & 1 deletion packages/wow-icons/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import baseConfig from "../shared-config/rollup.config.js";
import babel from "@rollup/plugin-babel";
import alias from "@rollup/plugin-alias";
import url from "@rollup/plugin-url";
import typescript from "@rollup/plugin-typescript";
import path from "path";
import { fileURLToPath } from "url";

const extensions = [".ts", ".tsx", ".js", ".jsx"];

const __dirname = path.dirname(fileURLToPath(import.meta.url));

process.env.BABEL_ENV = "production";

export default {
...baseConfig,
input: "./src/react/index.ts",
input: "./src/component/index.ts",
plugins: [
...baseConfig.plugins,
alias({
entries: [{ find: "@", replacement: path.join(__dirname, "./src") }],
}),
babel({
extensions,
include: ["src/**/*"],
Expand Down
2 changes: 1 addition & 1 deletion packages/wow-icons/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
"@/*": ["src/*"]
}
},
"include": ["src", "svg.d.ts"],
"include": ["src", "svg.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "dist"]
}
2 changes: 1 addition & 1 deletion packages/wow-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"keywords": [],
"license": "ISC",
"scripts": {
"build": "pnpm generate:build-config && rm -rf dist && rollup -c --bundleConfigAsCjs && panda cssgen --outfile dist/styles.css",
"build": "pnpm generate:build-config && rm -rf dist && rollup -c --bundleConfigAsCjs && tsc-alias && panda cssgen --outfile dist/styles.css",
"lint": "eslint . --max-warnings 0",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down
6 changes: 1 addition & 5 deletions packages/wow-ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
"paths": {
"@/*": ["src/*"],
"@styled-system/*": ["./styled-system/*"]
},
"plugins": [
{ "transform": "typescript-transform-paths" },
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
}
},
"include": ["src", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "dist", "styled-system"]
Expand Down

0 comments on commit bbbda4d

Please sign in to comment.