Skip to content
This repository has been archived by the owner on Oct 13, 2020. It is now read-only.

Great project - general questions / additions #16

Closed
6 tasks
acidjazz opened this issue Dec 22, 2018 · 2 comments
Closed
6 tasks

Great project - general questions / additions #16

acidjazz opened this issue Dec 22, 2018 · 2 comments

Comments

@acidjazz
Copy link

acidjazz commented Dec 22, 2018

Great project! I use L+N for tons of projects and have two types of production servers so I'd like to look into and test/contribute to this setup since it provides a much simpler solution.

If you'd like to answer these here I can help update your docs and contribute with PR's:

  • would it be possible to make the nuxt folder configurable? /resources/nuxt
  • this doesn't install the boilerplate nuxt stuff, does @import in nuxt look in /resources/nuxt for everything else? components/ and state/ etc?
  • for deployment you said i can just npm run build , do i then just need to have nginx or apache run PHP on production setups? does the laravel package just proxy to the static pages?
  • how about we pass in and support dotenv then we can share the same .env for both nuxtjs and PHP, maybe allow support to put the nuxt folder in there?
  • where exactly does all my other nuxt.config.js stuff go? same file? i just add the JS you stated in the readme?
  • i wonder if a comment in the docs to add 2 space indentation for *.js would help since thats most of the standards and installing laravel defaults * to 4.

I also forked this project and updated all the deps to use nuxtjs v2.3.4, working great so far!

@skyrpex
Copy link
Owner

skyrpex commented Mar 5, 2019

Sorry for the late reply 🙏.

would it be possible to make the nuxt folder configurable? /resources/nuxt

Yes, you should be able to use the Nuxt's srcDir option without problem: https://nuxtjs.org/api/configuration-srcdir/

this doesn't install the boilerplate nuxt stuff, does @import in nuxt look in /resources/nuxt for everything else? components/ and state/ etc?

Yes, it looks for the usual Nuxt files inside the srcDir directory, which is resources/nuxt when using laravel-nuxt. I think now it's a bit confusing.

for deployment you said i can just npm run build , do i then just need to have nginx or apache run PHP on production setups? does the laravel package just proxy to the static pages?

After running npm run build, all of the static assets (js, css, images, etc) should be inside the public/_nuxt directory. It should work fine whether you use Apache, Nginx or something else using the default configuration.

how about we pass in and support dotenv then we can share the same .env for both nuxtjs and PHP, maybe allow support to put the nuxt folder in there?

This belongs to user land. You can use dotenv to load the variables and pass them to the frontend using the env property.

where exactly does all my other nuxt.config.js stuff go? same file? i just add the JS you stated in the readme?

You should pass it to the laravelNuxt method.

const laravelNuxt = require("laravel-nuxt");

module.exports = laravelNuxt({
    // All of your Nuxt config here.
});

This is confusing too, I know... I'd love to change the confusing parts in the v2, but I'm quite busy...

i wonder if a comment in the docs to add 2 space indentation for *.js would help since thats most of the standards and installing laravel defaults * to 4.

Not sure what the problem is. You can use eslint and editorconfig to standarize the indentation in your own project.

I also forked this project and updated all the deps to use nuxtjs v2.3.4, working great so far!

Glad it's working for you! You should be able to upgrade nuxt in your projects directly (without forking laravel-nuxt).

@skyrpex skyrpex closed this as completed Mar 5, 2019
@acidjazz
Copy link
Author

acidjazz commented Mar 5, 2019

Thanks for the response @skyrpex , I actually hit a roadblock of some sort and started on my own boilerplate thats working well so far https://github.com/acidjazz/laranuxt

A bit more of a simpler setup, i just use the nuxtjs proxy module to route /api/ to laravel

I still am interested on how this project goes so I'll be looking for updates whenever you get time!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants