New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@awes-io/nuxt-laravel

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@awes-io/nuxt-laravel

Awes.io module for connection with Laravel backend

0.3.0
Source
npm
Version published
Maintainers
3
Created
Source

Awes.io module for connection with Laravel backend

Basic usage

Folders structure

\
-- app
-- bootstrap
-- config
-- ...other Laravel folders
-- resources /
---- nuxt
------ assets
------ components
------ ... other Nuxt folders
-- nuxt.config.js
-- package.json

Place Nuxt project into resources/nuxt folder, except nuxt.config.js and package.json. Place last mentioned files in the root of your project.

Follow next steps

  • Ensure you have @awes-io/laravel-nuxt in your composer.json
  • Install the module yarn add @awes-io/nuxt-laravel
  • Modify nuxt.config.js
// nuxt.config.js

export default {
    mode: 'spa',

    srcDir: 'resources/nuxt',

    modules: [
        '@awes-io/nuxt-laravel' // include first
        // other nuxt modules
    ]
}
  • Add scripts in your package.json
// package.json

{
    "scripts": {
        "dev": "LARAVEL_URL=http://path.to.dev.laravel nuxt",
        "build": "LARAVEL_URL=http://path.to.prod.laravel nuxt build",
        "generate": "LARAVEL_URL=http://path.to.prod.laravel nuxt generate",
        "start": "LARAVEL_URL=http://path.to.prod.laravel nuxt start"
    }
}
  • All done!

How the module works

This module will do the next steps:

  • Add @nuxtjs/axios module
  • Proxy requests on /api/ route to your laravel backend
  • Move built files to public path on nuxt generate command and create index.html for SPA entry point

Ensure to write proper commit message according to Git Commit convention

FAQs

Package last updated on 21 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts