-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: 자잘한 코드 수정 * feat: set rollup config * fix: storybook autodocs 설명이 안보이는 문제 해결 패키지 루트 대신 컴포넌트를 직접 참조하도록 변경 * chore: Test 컴포넌트 내보내기 * fix: rollup 패키지들 버전 다운그레이드 * feat: "use client" 지시어 유지되도록 설정 * chore: ve 설정 제거 * chore: toast docs 수정 * chore: 큰따옴표 수정 * style: toast style 수정 --------- Co-authored-by: solar3070 <>
- Loading branch information
Showing
16 changed files
with
535 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
const { | ||
createVanillaExtractPlugin | ||
} = require('@vanilla-extract/next-plugin'); | ||
const withVanillaExtract = createVanillaExtractPlugin(); | ||
|
||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
module.exports = { | ||
reactStrictMode: true, | ||
transpilePackages: ["ui"], | ||
}; | ||
|
||
module.exports = withVanillaExtract(nextConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"use client"; | ||
|
||
import { FC } from 'react'; | ||
|
||
import * as Dialogs from '@radix-ui/react-dialog'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import json from "@rollup/plugin-json"; | ||
import { vanillaExtractPlugin } from "@vanilla-extract/rollup-plugin"; | ||
import path from "path"; | ||
import dts from "rollup-plugin-dts"; | ||
import esbuild from "rollup-plugin-esbuild"; | ||
import nodeExternals from "rollup-plugin-node-externals"; | ||
import ts from "typescript"; | ||
import preserveDirectives from "rollup-plugin-preserve-directives"; | ||
|
||
const loadCompilerOptions = (tsconfig) => { | ||
if (!tsconfig) return {}; | ||
const configFile = ts.readConfigFile(tsconfig, ts.sys.readFile); | ||
const { options } = ts.parseJsonConfigFileContent( | ||
configFile.config, | ||
ts.sys, | ||
"./" | ||
); | ||
return options; | ||
}; | ||
|
||
const compilerOptions = loadCompilerOptions("tsconfig.json"); | ||
|
||
const plugins = [ | ||
vanillaExtractPlugin(), | ||
nodeExternals(), | ||
esbuild(), | ||
json(), | ||
preserveDirectives(), | ||
]; | ||
|
||
const dirSrc = [ | ||
["dist", "cjs"], | ||
["dist/esm", "esm"], | ||
]; | ||
|
||
export default [ | ||
...dirSrc.map(([dir, format]) => { | ||
return { | ||
input: ["index.ts", "cssVariables.ts"], | ||
plugins, | ||
output: { | ||
dir, | ||
format, | ||
preserveModules: true, | ||
preserveModulesRoot: ".", | ||
entryFileNames({ name }) { | ||
return `${name.replace(/\.css$/, ".css.vanilla")}.js`; | ||
}, | ||
assetFileNames({ name }) { | ||
return name; | ||
}, | ||
exports: "named", | ||
}, | ||
onwarn(warning, warn) { | ||
const errorCode = ["MODULE_LEVEL_DIRECTIVE", "SOURCEMAP_ERROR"]; | ||
if (!errorCode.includes(warning.code)) { | ||
warn(warning); | ||
} | ||
}, | ||
}; | ||
}), | ||
// Declaration files | ||
{ | ||
input: ["index.ts", "cssVariables.ts"], | ||
plugins: [ | ||
...plugins, | ||
dts({ | ||
compilerOptions: { | ||
...compilerOptions, | ||
baseUrl: path.resolve(compilerOptions.baseUrl || "."), | ||
declaration: true, | ||
noEmit: false, | ||
emitDeclarationOnly: true, | ||
noEmitOnError: true, | ||
target: ts.ScriptTarget.ESNext, | ||
}, | ||
}), | ||
], | ||
output: [ | ||
{ | ||
dir: "dist", | ||
format: "esm", | ||
preserveModules: true, | ||
preserveModulesRoot: ".", | ||
}, | ||
], | ||
}, | ||
]; | ||
|
Oops, something went wrong.