Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@nx-plus/nuxt:static dont behavior like nuxt generate ignoring dir folder on nuxt.config #277

Open
schirrel opened this issue Nov 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@schirrel
Copy link

schirrel commented Nov 9, 2022

Current Behavior

I am need to build static SSG with nuxt and the build output must be on exactly dist/production but when i use the yarn nx static from @nx-plus/nuxt:static it always generate the "/dist" folder.

I had even add the below code on my nuxt.config.js but it was ignored

  target: 'static',
  generate: {
    dir: '../../dist/production',
    fallback: true,

  },

I hade also set "buildDir": "dist/production" on project.json but the nx-plus keeps generating a dist folder inside the dist/production folder, image:
Captura de Tela 2022-11-09 às 18 18 24

I've tried to use nx:run-commands to see if my config on nuxt.config.js was wrong, but with nuxt generate" the dist folder is not generate inside the dist/production, see:
Captura de Tela 2022-11-09 às 18 20 52

Expected Behavior

@nx-plus/nuxt:static respect the build defined at nuxt.config.js under generate.dir prop, like the nuxt generate does:
Captura de Tela 2022-11-09 às 18 20 52

Steps to Reproduce

Fork: https://github.com/schirrel/nx-nuxt-vue

  • yarn
  • yarn nx static my-app (you will see generating it with /dist inside the `dist/production
  • yarn nx nuxtgenerate my-app (you will see generating it the build output directly on `dist/production

Environment

Plugin name and version: "@nx-plus/nuxt": "14.1.0",

   Node : 16.16.0
   OS   : darwin arm64
   yarn : 1.22.19
   
   nx : 14.5.6
   @nrwl/angular : Not Found
   @nrwl/cypress : 14.5.6
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.5.6
   @nrwl/eslint-plugin-nx : 14.5.6
   @nrwl/express : Not Found
   @nrwl/jest : 14.5.6
   @nrwl/js : 14.5.6
   @nrwl/linter : 14.5.6
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/workspace : 14.5.6
   typescript : 4.7.4
   ---------------------------------------
   Local workspace plugins:
   ---------------------------------------
   Community plugins:
         @nx-plus/nuxt: 14.1.0
         @nx-plus/vue: 14.1.0
@schirrel schirrel added the bug Something isn't working label Nov 9, 2022
@schirrel
Copy link
Author

hey @ZachJW34 i've found where it need to be change, what you say? can i open a pr?
or may we need to discuss this?
Basically the static generator keeps using the browser build instead of the generator

@schirrel
Copy link
Author

schirrel commented Feb 3, 2023

@ZachJW34 @BuckyMaler could you see this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant