Skip to content

Commit

Permalink
fix: 🐛 cjs tailwind errors
Browse files Browse the repository at this point in the history
  • Loading branch information
woldtwerk committed Jul 1, 2024
1 parent 06fa840 commit fe1abea
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/tailwind/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineBuildConfig({
'unconfig',
],
rollup: {
emitCJS: false,
emitCJS: true,
inlineDependencies: true,
},
})
5 changes: 3 additions & 2 deletions packages/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "dist/index.mjs",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-drupal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@vue/runtime-core": "^3.4.31",
"@vue/shared": "^3.4.31",
"@vueuse/core": "^10.11.0",
"tailwindcss": "^3.4.4",
"typescript": "^5.5.2",
"unimport": "^3.7.2",
"unplugin-icons": "^0.19.0",
Expand All @@ -70,6 +69,7 @@
"fs-extra": "^11.2.0",
"magic-string": "^0.30.10",
"rollup": "^4.18.0",
"tailwindcss": "^3.4.4",
"web-component-analyzer": "^2.0.0",
"yaml": "^2.4.5"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-drupal/src/plugins/breakpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import process from 'node:process'
import fse from 'fs-extra'
import type { Plugin, ResolvedConfig } from 'vite'
import YAML from 'yaml'
import resolveConfig from 'tailwindcss/resolveConfig'
import resolveConfig from 'tailwindcss/resolveConfig.js'
import type { Context } from './context'

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-drupal/src/plugins/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default (ctx: Context): Plugin => {
plugins: [
// @ts-expect-error missing types
((await import('postcss-import')).default),
((await import('tailwindcss/nesting')).default),
((await import('tailwindcss/nesting/index.js')).default),
((await import('tailwindcss')).default),
// @ts-expect-error missing types
((await import('@ueberbit/postcss/stripcolor')).default),
Expand Down
Loading

0 comments on commit fe1abea

Please sign in to comment.