Skip to content

Commit

Permalink
fix(css): support postcss.config.ts (#7935)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Apr 28, 2022
1 parent 7f535ac commit 274c10e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/playground/tailwind/package.json
Expand Up @@ -15,6 +15,7 @@
"vue-router": "^4.0.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "workspace:*"
"@vitejs/plugin-vue": "workspace:*",
"ts-node": "^10.4.0"
}
}
@@ -1,4 +1,4 @@
// postcss.config.js
// postcss.config.ts
module.exports = {
plugins: {
tailwindcss: { config: __dirname + '/tailwind.config.js' },
Expand Down
5 changes: 5 additions & 0 deletions packages/vite/rollup.config.js
Expand Up @@ -171,6 +171,11 @@ const createNodeConfig = (isProduction) => {
'lilconfig/dist/index.js': {
pattern: /: require,/g,
replacement: `: eval('require'),`
},
// postcss-load-config calls require after register ts-node
'postcss-load-config/src/index.js': {
src: `require(configFile)`,
replacement: `eval('require')(configFile)`
}
}),
commonjs({
Expand Down
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 274c10e

Please sign in to comment.