Skip to content

Commit

Permalink
fix: use correct defuArrayFn and fix srcDir error
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed May 23, 2022
1 parent a80c69a commit cef3a9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { join, relative } from 'path'
import { existsSync } from 'fs'
import defu from 'defu'
import { defuArrayFn } from 'defu'
import chalk from 'chalk'
import { withTrailingSlash } from 'ufo'
import consola from 'consola'
import {
defineNuxtModule,
installModule,
addTemplate,
addServerMiddleware,
addDevServerHandler,
requireModule,
isNuxt2,
createResolver,
Expand Down Expand Up @@ -66,7 +66,7 @@ export default defineNuxtModule({
}

// Merge with our default purgecss default
tailwindConfig = defu.arrayFn(tailwindConfig, moduleOptions.config)
tailwindConfig = defuArrayFn(tailwindConfig, moduleOptions.config)

// Expose resolved tailwind config as an alias
// https://tailwindcss.com/docs/configuration/#referencing-in-javascript
Expand Down Expand Up @@ -125,7 +125,7 @@ export default defineNuxtModule({
}
_viewerDevMiddleware(req, res)
}
addServerMiddleware({ route, handler: viewerDevMiddleware })
addDevServerHandler({ route, handler: viewerDevMiddleware })
nuxt.hook('listen', (_, listener) => {
const fullPath = `${withoutTrailingSlash(listener.url)}${route}`
logger.info(`Tailwind Viewer: ${chalk.underline.yellow(fullPath)}`)
Expand Down
2 changes: 1 addition & 1 deletion src/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default ({ srcDir }) => ({
`${srcDir}/composables/**/*.{js,ts}`,
`${srcDir}/plugins/**/*.{js,ts}`,
`${srcDir}/App.{js,ts,vue}`,
`${srcDir}/app.{js,ts,vue}`
`${srcDir}/app.{js,ts,vue}`,
`${srcDir}/Error.{js,ts,vue}`,
`${srcDir}/error.{js,ts,vue}`
// TODO: This makes issues with import protection
Expand Down

0 comments on commit cef3a9f

Please sign in to comment.