jamesAtcodeninja
34
jamesAtcodeninja
commented 10 months ago

I created a NuxtGenerate ace command with the following code

class NuxtGenerate extends Command {
  /**
   * signature defines the requirements and name
   * of command.
   *
   * @return {String}
   */
  get signature () {
    return 'nuxtGenerate';
  }

  /**
   * description is the little helpful information displayed
   * on the console.
   *
   * @return {String}
   */
  get description () {
    return 'Generate for production the nuxt.js application.';
  }

  /**
   * handle method is invoked automatically by ace, once your
   * command has been executed.
   *
   * @param  {Object} args    [description]
   * @param  {Object} options [description]
   */
  * handle (args, options) {
    const config = Config.get('nuxt');
    config.dev = false;
    config.mode = 'spa';
    this.nuxt = new Nuxt(config);
    const builder = new Builder(this.nuxt);
    this.info('Generating nuxt.js application...');
    yield new Generator(this.nuxt, builder).generate();
  }
}

However, the generated code does not render the HTML from javascript.
Has anyone experienced using nuxt generate with adonuxt?

0
enero
0
enero
commented 17 days ago

Has a solution been found?

0
Informations
Question โ€ข Unresolved
#c69 - Created 10 months ago