chore: components 패키지 config 수정

This commit is contained in:
2025-02-25 16:42:06 +09:00
parent 177c9a7d89
commit b42042d999
4 changed files with 18 additions and 2 deletions
@@ -1,3 +1,5 @@
import path from "path";
import tsconfigPaths from "vite-tsconfig-paths";
import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
@@ -13,12 +15,18 @@ const config: StorybookConfig = {
name: "@storybook/react-vite",
options: {},
},
viteFinal: (config) => {
viteFinal: async (config) => {
config.define = {
"process.env.BASE_ASSETS_PATH": JSON.stringify(
process.env.BASE_ASSETS_PATH,
),
};
config.plugins?.push(
tsconfigPaths({
projects: [path.resolve(path.dirname(__dirname), "tsconfig.json")],
}),
);
return config;
},
};
+1
View File
@@ -27,6 +27,7 @@
"clean": "rm -rf dist"
},
"dependencies": {
"@common/assets": "workspace:*",
"@radix-ui/react-accordion": "^1.2.3",
"@radix-ui/react-checkbox": "^1.1.4",
"@radix-ui/react-dropdown-menu": "^2.1.6",
+2 -1
View File
@@ -14,7 +14,8 @@
"strict": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
"@/*": ["src/*"],
"@common/assets": ["../assets/dist"]
}
},
"exclude": ["**/node_modules", "**/.*/*", "dist"],
@@ -17,4 +17,10 @@ export default defineConfig((options) => ({
cssMinify: !options.watch,
cssModules: true,
postcss: true,
esbuildOptions(options) {
options.alias = {
"@/*": path.resolve(__dirname, "src/*"),
"@assets/*": path.resolve(__dirname, "public/assets/*"),
};
},
}));