diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-10-21 11:00:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-21 11:00:33 +0200 |
commit | d1c6e2eaed90891fc8e187f147af224b352662c8 (patch) | |
tree | 982bd663d60b22b14f719af03cd459e5ee3b3ed4 /nuxt.config.js | |
parent | 72549ed7b81fc01445fecdb7889bab4cf2a1590f (diff) | |
parent | 07ac4a05a3e02c95ba9482f94f19589b8ab7fd3c (diff) | |
download | puszcza-d1c6e2eaed90891fc8e187f147af224b352662c8.tar.gz puszcza-d1c6e2eaed90891fc8e187f147af224b352662c8.zip |
Merge pull request #3 from 19pdh/kronika
Kronika
Diffstat (limited to 'nuxt.config.js')
-rw-r--r-- | nuxt.config.js | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/nuxt.config.js b/nuxt.config.js index a0ae413..e00db35 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,3 +1,7 @@ +import k from './api' + +const BASE_URL = process.env.DEPLOY_PRIME_URL || 'http://localhost:3000' + export default { mode: 'universal', /* @@ -20,6 +24,11 @@ export default { { name: 'google-site-verification', content: 'V9-RG4-ertDzO9hqxuG29PkDUM8PGqaSOYUMiMaGUOY' + }, + { + hid: 'og:image', + name: 'og:image', + content: `${BASE_URL}/assets/og/default.jpg` } ], link: [ @@ -31,6 +40,12 @@ export default { } ] }, + env: { + baseUrl: process.env.DEPLOY_URL || 'http://localhost:3000' + }, + generate: { + routes: k.getPosts().map(post => post.route) + }, /* ** Customize the progress-bar color */ @@ -67,6 +82,28 @@ export default { /* ** You can extend webpack config here */ - extend(config, ctx) {} + extend(config, { isDev, isClient }) { + if (isClient) { + config.node = { + fs: 'empty', + child_process: 'empty', + tls: 'empty', + net: 'empty' + } + } + config.module.rules.push({ + test: /\.md$/, + use: ['raw-loader'] + }) + } + }, + hooks: { + generate: { + routeCreated({ route, path, errors }) { + console.log(route) + console.log(path) + console.log(errors) + } + } } } |