We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed76e04 commit f35b1ccCopy full SHA for f35b1cc
lib/serverMiddleware/tailwindConfigViewer.js
@@ -1,11 +1,11 @@
1
-import { withoutTrailingSlash, withTrailingSlash } from '@nuxt/ufo'
2
-import createServer from 'tailwind-config-viewer/server'
+const { withoutTrailingSlash, withTrailingSlash } = require('@nuxt/ufo')
+const createServer = require('tailwind-config-viewer/server')
3
4
const server = createServer({
5
tailwindConfigProvider: () => process.nuxt ? process.nuxt.$config.tailwind.getConfig() : {}
6
}).asMiddleware()
7
8
-export default (req, res) => {
+module.exports = (req, res) => {
9
if (req.originalUrl === withoutTrailingSlash(process.nuxt.$config.tailwind.viewerPath)) {
10
res.writeHead(301, { Location: withTrailingSlash(req.originalUrl) })
11
res.end()
0 commit comments