skyrpex / laravel-nuxt-js

Build a SPA with Laravel and Nuxt.
https://www.npmjs.com/package/laravel-nuxt
MIT License
146 stars 20 forks source link

Confusing installation instructions for nuxt.config.js #24

Closed connecteev closed 5 years ago

connecteev commented 5 years ago

Following the install instructions here: https://github.com/skyrpex/laravel-nuxt and then https://github.com/skyrpex/laravel-nuxt-js

All of a sudden I see a reference to


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

module.exports = laravelNuxt({
  // Your Nuxt options here...
  modules: [],
  plugins: [],

  // Options such as mode, srcDir and generate.dir are already handled for you.
});

However, up until this point we don't have a nuxt.config.js file (we never installed Nuxt directly). What am I missing?

Also where does all the code at https://github.com/skyrpex/laravel-nuxt-js go, given that we started with https://github.com/skyrpex/laravel-nuxt ?

skyrpex commented 5 years ago

👋 Hi,

You could start with that nuxt config file as is, it should work. Nuxt is installed as a dependency of the laravel-nuxt NPM package.

Also where does all the code at https://github.com/skyrpex/laravel-nuxt-js go, given that we started with https://github.com/skyrpex/laravel-nuxt ?

It's installed by NPM or Yarn under node_modules.

connecteev commented 5 years ago

Thank you, i got it working :) I really need SSR though! Thanks for the quick response.