Commit 9a9e87b1ac89ee650b8ce508a34b0bc139f4ee83
Fixes preact alias and remove images prefetch
Rômulo Alves committed on 5/6/2018, 11:27:48 AMParent: 5bb525da770fe1c598313238d544b389e0fabaaf
Files changed
components/social.js | changed |
server.js | changed |
components/social.js | ||
---|---|---|
@@ -1,12 +1,6 @@ | ||
1 | -import Head from 'next/head'; | |
2 | - | |
3 | 1 … | export default () => ( |
4 | 2 … | <div className="socials"> |
5 | - <Head> | |
6 | - <link rel="prefetch" href="/static/images/twitter.svg" /> | |
7 | - <link rel="prefetch" href="/static/images/github.svg" /> | |
8 | - </Head> | |
9 | 3 … | <a href="https://twitter.com/romuloalves" title="Twitter"> |
10 | 4 … | <img src="/static/images/twitter.svg" alt="Twitter" width="20" height="20" /> |
11 | 5 … | </a> |
12 | 6 … | <a href="https://github.com/romuloalves" title="GitHub"> |
server.js | |||
---|---|---|---|
@@ -1,14 +1,17 @@ | |||
1 | -require('@zeit/next-preact/alias')(); | ||
1 … | +const dev = process.env.NODE_ENV !== 'production'; | ||
2 | 2 … | ||
3 … | +if (!dev) { | ||
4 … | + require('@zeit/next-preact/alias')(); | ||
5 … | +} | ||
6 … | + | ||
3 | 7 … | const { createServer } = require('http'); | |
4 | 8 … | const { parse } = require('url'); | |
5 | 9 … | const { createReadStream } = require('fs'); | |
6 | 10 … | const { join } = require('path'); | |
7 | 11 … | const next = require('next'); | |
8 | 12 … | ||
9 | 13 … | const port = parseInt(process.env.PORT, 10) || 3000; | |
10 | -const dev = process.env.NODE_ENV !== 'production'; | ||
11 | 14 … | const app = next({ dev }); | |
12 | 15 … | const handle = app.getRequestHandler(); | |
13 | 16 … | ||
14 | 17 … | app.prepare() |
Built with git-ssb-web