Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 5f64b68

Browse files
committed
added isStatic to nuxtent config options FIX #47
1 parent a10ebb7 commit 5f64b68

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export default function ContentModule(moduleOpts) {
4545
srcDir: '/content',
4646
componentsDir: '/components',
4747
buildDir: `/content`,
48+
isStatic: userOptions.isStatic || process.env.STATIC || false,
4849

4950
content: contentOptions(userOptions.content, {
5051
page: null,

lib/plugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import Vue from 'vue'
22

33
const { join } = require('path')
44

5-
const isStatic = process.env.STATIC
65
const options = <%= JSON.stringify(options) %>
76
const mdComps = {}
87

@@ -34,7 +33,7 @@ export default ({ app, isServer, isClient, hotReload, route }) => {
3433
const isNotContentReq = hotReload || route.fullPath.includes('__webpack_hmr?') || route.fullPath.includes('.hot-update.')
3534
if (isNotContentReq) return
3635

37-
const isAPI = isServer || !isStatic
36+
const isAPI = isServer || !options.isStatic
3837
const cache = {}
3938

4039
async function fetchContent (path, permalink, query = '') {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuxtent",
3-
"version": "0.2.76",
3+
"version": "0.2.77",
44
"description": "Content Module for Nuxt.js.",
55
"main": "dist/module.js",
66
"contributors": [

0 commit comments

Comments
 (0)