1.0.3 • Published 5 years ago

think-nuxt v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

think-nuxt

Nuxtjs for thinkjs middleware

安装

npm install think-nuxt --save

使用

在 middleware 中引入, 中间件文件在 src/config/middleware.js

const nuxt = require('think-nuxt');

配置 handle 参数

{
    handle: nuxt,
    options: {}
}

配置 options

  {
    handle: 'nuxt',
    options: {
      config: nuxtConfig, 	// nuxt.config.js 配置文件,默认识别为 think.ROOT_PATH/nuxt.config.js
      unless: [/^\/api?/],	// 非 nuxtjs 拦截的目录,如果 api controller 等
      isDev: isDev		// dev 模式下 nuxtjs 将主动编译
    }
  },

示例项目

https://github.com/baisheng/nuxt-thinkjs3

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago