Nuxt.js: Running nuxt in subfolder / assetPrefix ?

Created on 19 Oct 2017  路  2Comments  路  Source: nuxt/nuxt.js

Is it possible to run a nuxt.js (starter template) in a subfolder?
The problem is that the assets will point to a wrong path.

Maybe exposing something like next assetPrefix would be great. Also if you're deploying to lamda / api gateway where you have different stages in the url. Like api.

This question is available on Nuxt.js community (#c1698)
question

Most helpful comment

okay, this can be done with router.base

 router: {
    base: process.env.NODE_ENV === 'dev' ? '/' : '/subfolder/'
  },

1052

All 2 comments

okay, this can be done with router.base

 router: {
    base: process.env.NODE_ENV === 'dev' ? '/' : '/subfolder/'
  },

1052

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

surmon-china picture surmon-china  路  3Comments

bimohxh picture bimohxh  路  3Comments

vadimsg picture vadimsg  路  3Comments

gary149 picture gary149  路  3Comments

mikekidder picture mikekidder  路  3Comments