mirror of
https://github.com/baserow/baserow.git
synced 2026-12-05 08:48:35 +00:00
* fix nuxt.test.config for saas * add .nuxtrc * Enhance Nuxt configuration to ignore sourcemaps from node_modules * Add nuxt-prepare command to docker-entrypoint.sh for generating .nuxt directory * Refactor license.vue to use Composition API * Add korean language support * Add impersonate middleware to dashboard and workspace pages * Mount local backend/media folder in docker-compose for Caddy to serve uploaded files during development * Fix invitation related issues * Update email configuration for local development with Mailhog integration * Add moment-guess to optimizeDeps in Nuxt configuration to pre-bundle and avoid missing source map warnings * Refactor login components to use Composition API and improve routing structure for login pages * Update sidebar user context to conditionally display workspace creation option based on user permissions * Centralize locale definitions in a new config file * please linter
56 lines
1.2 KiB
JavaScript
56 lines
1.2 KiB
JavaScript
import {
|
|
defineNuxtModule,
|
|
addPlugin,
|
|
createResolver,
|
|
extendPages,
|
|
addTemplate,
|
|
addRouteMiddleware,
|
|
} from 'nuxt/kit'
|
|
import { routes } from './routes'
|
|
import { locales } from '../../config/locales.js'
|
|
|
|
export default defineNuxtModule({
|
|
meta: {
|
|
name: '@baserow/builder',
|
|
configKey: 'builder',
|
|
compatibility: {
|
|
nuxt: '^3.0.0',
|
|
},
|
|
},
|
|
dependsOn: ['core'],
|
|
async setup(options, nuxt) {
|
|
const { resolve } = createResolver(import.meta.url)
|
|
|
|
// Add main plugin
|
|
addPlugin(resolve('./plugin.js'))
|
|
|
|
// Add global plugin
|
|
addPlugin(resolve('./plugins/global.js'))
|
|
addPlugin(resolve('./plugins/router.js'))
|
|
addPlugin(resolve('./plugins/realtime.js'))
|
|
|
|
addRouteMiddleware({
|
|
name: 'selectWorkspaceBuilderPage',
|
|
path: resolve('./middleware/selectWorkspaceBuilderPage.js'),
|
|
})
|
|
|
|
// Add routes
|
|
extendPages((pages) => {
|
|
pages.push(...routes)
|
|
})
|
|
|
|
// Register i18n translations
|
|
nuxt.hook('i18n:registerModule', (register) => {
|
|
register({
|
|
langDir: resolve('./locales'),
|
|
locales,
|
|
})
|
|
})
|
|
|
|
nuxt.hook('vite:extendConfig', (config) => {
|
|
config.server ||= {}
|
|
config.server.allowedHosts = true
|
|
})
|
|
},
|
|
})
|