Skip to content

Commit

Permalink
fix: remove now-unneeded @types/tailwindcss (#514)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Roe <daniel@roe.dev>
  • Loading branch information
genu and danielroe committed Aug 12, 2022
1 parent 5cec9fc commit 82ea9b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"dependencies": {
"@nuxt/kit": "^3.0.0-rc.5",
"@nuxt/postcss8": "^1.1.3",
"@types/tailwindcss": "^3.0.11",
"autoprefixer": "^10.4.7",
"chalk": "^5.0.1",
"clear-module": "^4.1.2",
Expand Down
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ export default defineNuxtModule<ModuleOptions>({
// Expose resolved tailwind config as an alias
// https://tailwindcss.com/docs/configuration/#referencing-in-javascript
if (moduleOptions.exposeConfig) {
const resolveConfig = await import('tailwindcss/resolveConfig.js').then(r => r.default || r) as any
const resolveConfig = await import('tailwindcss/resolveConfig.js').then(r => r.default || r)
const resolvedConfig = resolveConfig(tailwindConfig)
const template = addTemplate({
filename: 'tailwind.config.mjs',
getContents: () => `export default ${JSON.stringify(resolvedConfig, null, 2)}`
})
addTemplate({
filename: 'tailwind.config.d.ts',
getContents: () => 'declare const config: import("tailwindcss/tailwind-config").TailwindConfig\nexport { config as default }',
getContents: () => 'declare const config: import("tailwindcss").Config\nexport { config as default }',
write: true
})
nuxt.options.alias['#tailwind-config'] = template.dst
Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -908,13 +908,6 @@
dependencies:
"@types/node" "*"

"@types/tailwindcss@^3.0.11":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@types/tailwindcss/-/tailwindcss-3.1.0.tgz#1185e4b3437c6e0f19d6cc8cd42738a94fd7b64f"
integrity sha512-JxPzrm609hzvF4nmOI3StLjbBEP3WWQxDDJESqR1nh94h7gyyy3XSl0hn5RBMJ9mPudlLjtaXs5YEBtLw7CnPA==
dependencies:
tailwindcss "*"

"@types/tough-cookie@*":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397"
Expand Down Expand Up @@ -7302,7 +7295,7 @@ tailwind-config-viewer@^1.7.1:
portfinder "^1.0.26"
replace-in-file "^6.1.0"

tailwindcss@*, tailwindcss@^3.1.6:
tailwindcss@^3.1.6:
version "3.1.6"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.1.6.tgz#bcb719357776c39e6376a8d84e9834b2b19a49f1"
integrity sha512-7skAOY56erZAFQssT1xkpk+kWt2NrO45kORlxFPXUt3CiGsVPhH1smuH5XoDH6sGPXLyBv+zgCKA2HWBsgCytg==
Expand Down

0 comments on commit 82ea9b7

Please sign in to comment.