Skip to content

Commit

Permalink
feat: update nuxt-vite to 0.1.x (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored May 12, 2021
1 parent 18e0a77 commit b44372a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 33 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@
"nuxt-edge": "^2.16.0-27012971.cd1fc627",
"nuxt-extend": "^0.1.0",
"nuxt-i18n": "^6.27.0",
"nuxt-vite": "0.0.39",
"nuxt-vite": "0.1.0",
"nuxt-windicss": "^0.7.2",
"ohmyfetch": "^0.1.8",
"patch-package": "^6.4.7",
"plausible-tracker": "^0.3.1",
"postinstall-postinstall": "^2.1.0",
"prism-theme-vars": "^0.2.2",
"prismjs": "^1.23.0",
"puppeteer-core": "^8.0.0",
Expand Down Expand Up @@ -110,9 +112,7 @@
"vue-docgen-api": "^4.38.2",
"vue-plausible": "^1.1.4",
"vue3": "npm:vue@next",
"vue3-router": "npm:vue-router@next",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0"
"vue3-router": "npm:vue-router@next"
},
"devDependencies": {
"@nuxt/types": "^2.15.5",
Expand Down
13 changes: 0 additions & 13 deletions patches/nuxt-vite+0.0.39.patch

This file was deleted.

12 changes: 1 addition & 11 deletions src/app/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ const r = (...args: any[]) => resolve(__dirname, ...args)

export default <Module>function docusAppModule() {
const { nuxt } = this
const { hook, options } = nuxt

// Extend `/` route
hook('build:extendRoutes', (routes: any[]) => {
nuxt.hook('build:extendRoutes', (routes: any[]) => {
const hasRoute = (name: string) => routes.some(route => route.name === name)

if (!hasRoute('all')) {
Expand All @@ -19,12 +17,4 @@ export default <Module>function docusAppModule() {
})
}
})

// Inject Admin UI
if (options.dev) {
// Disable SSR in dev
options.ssr = false
options.build.ssr = false
options.render.ssr = false
}
}
2 changes: 1 addition & 1 deletion src/app/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ export default nuxtConfig({
* Build configs
*/
target: 'static',
ssr: true,
server: {
port: process.env.PORT || 4000
},
vite: {
experimentWarning: false,
optimizeDeps: {
exclude: ['ohmyfetch', 'vue-demi', 'scule', '@vueuse/integrations', 'lokidb'],
include: [
Expand Down
Empty file added src/app/static/.gitkeep
Empty file.
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9133,10 +9133,10 @@ nuxt-i18n@^6.27.0:
ufo "^0.7.2"
vue-i18n "^8.24.4"

nuxt-vite@0.0.39:
version "0.0.39"
resolved "https://registry.yarnpkg.com/nuxt-vite/-/nuxt-vite-0.0.39.tgz#0a71473c758d9530533315c34dd4ea44bb6d6a33"
integrity sha512-pMFvItwLpQK3QDb4hjiSqL9g2pCa9qAEiKukljUDE/3BCu9SS3Y0HO3SUFETMy6WBQvyEhHJWftawWfzW5Lnow==
nuxt-vite@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/nuxt-vite/-/nuxt-vite-0.1.0.tgz#6c9bd69ee2bd8ade22665676ed4b9d3141dbf89c"
integrity sha512-FTg0iEeTykF+PkOmA+pzS9KUbqfxQQxH2aw3zwiFjSxzwVwURB0ygIz7O6waE/4CyCrjhGc33X4qAKOjCodh8g==
dependencies:
"@nuxt/http" "^0.6.4"
chokidar "^3.5.1"
Expand Down

1 comment on commit b44372a

@vercel
Copy link

@vercel vercel bot commented on b44372a May 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.