๐ซ tailwindcss ์ค์น ํ postcss ์๋ฌ๊ฐ ๋ฐ์ํ ๋
ํ๋ก์ ํธ ์ธํ
์ค tailwindcss์ Get started with Tailwind CSS๋ฅผ ์ฐจ๊ทผ์ฐจ๊ทผ ๋ฐ๋ผํ๋๋ฐ๋ npm run dev
์ Failed to load PostCSS config ์๋ฌ๊ฐ ๋ฐ์ํ๋ค. postcss.config.js
ํ์ผ์ด ๋ฌธ์ ์ธ ๊ฒ ๊ฐ์๋ค.
PS C:\git-repo\twitter-clone> npm run dev
> twitter-clone@0.0.0 dev
> vite
VITE v4.3.8 ready in 431 ms
โ Local: http://127.0.0.1:5173/
โ Network: use --host to expose
โ press h to show help
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
[Failed to load PostCSS config: Failed to load PostCSS config (searchPath: C:/git-repo/twitter-clone): [Failed to load PostCSS config] Failed to load PostCSS config (searchPath: C:/git-repo/twitter-clone): [ReferenceError] module is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and 'C:\git-repo\twitter-clone\package.json' contains "type": "module". To treat it as a CommonJS
script, rename it to use the '.cjs' file extension.
This file is being treated as an ES module because it has a '.js' file extension and 'C:\git-repo\twitter-clone\package.json' contains "type": "module". To treat it as a CommonJS
script, rename it to use the '.cjs' file extension.
at file:///C:/git-repo/twitter-clone/postcss.config.js:1:1
at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
at async importDefault (file:///C:/git-repo/twitter-clone/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:36460:18)
at async Object.search (file:///C:/git-repo/twitter-clone/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:28897:38)
]
โ postcss.config.js์ ํ์ฅ์ ๋ณ๊ฒฝํ๊ธฐ
๋ก๊ทธ๊ฐ ์ํค๋๋๋ก postcss.config.js
๋ฅผ postcss.config.cjs
๋ก rename ํ์ ํด๊ฒฐ๋์๋ค.
PS C:\git-repo\twitter-clone> npm run dev
> twitter-clone@0.0.0 dev
> vite
VITE v4.3.8 ready in 366 ms
โ Local: http://127.0.0.1:5173/
โ Network: use --host to expose
โ press h to show help
warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
warn - https://tailwindcss.com/docs/content-configuration
์ค์ 10:51:38 [vite] page reload tailwind.config.js
๐ญ Tailwindcss ์ค์น ์ฐธ๊ณ ์ฃผ์
https://tailwindcss.com/docs/installation/using-postcss
๋ฐ์ํ
'Web > Study' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Vuejs] Vite+Vue๋ก ํ๋ก์ ํธ ์์ํ๊ธฐ (0) | 2023.05.18 |
---|---|
[๊ฐ์๋ฉ๋ชจ] ์ค์ต UI ๊ฐ๋ฐ๋ก ๋ฐฐ์๋ณด๋ ์์ javascript์ VueJS ๊ฐ๋ฐ (0) | 2022.05.01 |
MVC Pattern (0) | 2022.04.29 |