You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I already tried to ask on discord and @aleclarson told me to file an issue.
When using typescript for postcss.config.ts I get the following error:
8:20:32 PM [vite] Internal server error: Could not dynamically require "/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/postcss.config.ts". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.
Plugin: vite:css
File: /Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/src/index.css
at require (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/dist/node/chunks/dep-713b45e1.js:88:8)
at /Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/.pnpm/postcss-load-config@3.1.0_ts-node@10.2.1/node_modules/postcss-load-config/src/index.js:106:16
at Object.search (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/.pnpm/lilconfig@2.0.3/node_modules/lilconfig/dist/index.js:126:37)
at async resolvePostcssConfig (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/plugins/css.ts:806:16)
at async compileCSS (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/plugins/css.ts:588:25)
at async TransformContext.transform (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/plugins/css.ts:183:11)
at async Object.transform (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/server/pluginContainer.ts:509:20)
at async doTransform (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/server/transformRequest.ts:160:27) (x6)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
I think originally the problem is that Vite depends on postcss-load-config which only recently added support for postcss.config.ts in the 3.1.0 release. Until yesterday's 2.6.10 release Vite had postcss-load-config@3.0.0 see: #5277.
However, today even after updating to 2.6.10 I am still getting the same error as I was before. The same error you are getting here.
Describe the bug
Note: I already tried to ask on discord and @aleclarson told me to file an issue.
When using typescript for postcss.config.ts I get the following error:
8:20:32 PM [vite] Internal server error: Could not dynamically require "/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/postcss.config.ts". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.
Plugin: vite:css
File: /Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/src/index.css
at require (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/dist/node/chunks/dep-713b45e1.js:88:8)
at /Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/.pnpm/postcss-load-config@3.1.0_ts-node@10.2.1/node_modules/postcss-load-config/src/index.js:106:16
at Object.search (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/.pnpm/lilconfig@2.0.3/node_modules/lilconfig/dist/index.js:126:37)
at async resolvePostcssConfig (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/plugins/css.ts:806:16)
at async compileCSS (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/plugins/css.ts:588:25)
at async TransformContext.transform (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/plugins/css.ts:183:11)
at async Object.transform (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/server/pluginContainer.ts:509:20)
at async doTransform (/Users/Diatta/WebstormProjects/vite-postcss-tailwind-test/node_modules/vite/src/node/server/transformRequest.ts:160:27) (x6)
Reproduction
https://github.com/ALMaclaine/vite-postcss-tailwind-test
npm run dev
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: