Thanks to visit codestin.com
Credit goes to github.com

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

Commit c97f7f2

Browse files
committed
add export map
1 parent 4341505 commit c97f7f2

File tree

4 files changed

+68
-861
lines changed

4 files changed

+68
-861
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,4 @@ $RECYCLE.BIN/
117117
# Others
118118
data/
119119
.next/
120+
out/

next.config.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ module.exports = {
44
webpack: (config, { dev }) => {
55
/* Enable only in Production */
66
if (!dev) {
7-
// Preact
8-
console.log('> Using Preact instead of React');
9-
config.resolve.alias = {
10-
react: 'preact-compat/dist/preact-compat',
11-
'react-dom': 'preact-compat/dist/preact-compat',
12-
};
137
if (ANALYZE) {
148
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
159
config.plugins.push(
@@ -23,4 +17,12 @@ module.exports = {
2317
}
2418
return config;
2519
},
20+
exportPathMap() {
21+
return {
22+
'/': { page: '/' },
23+
'/events': { page: '/events' },
24+
'/learn': { page: '/learn' },
25+
'/space': { page: '/space' },
26+
};
27+
},
2628
};

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"analyze": "cross-env ANALYZE=1 next build",
1111
"dev": "cross-env NODE_ENV=development next",
1212
"start": "cross-env NODE_ENV=production next start",
13-
"build": "next build"
13+
"build": "next build",
14+
"export": "yarn build && next export"
1415
},
1516
"xo": {
1617
"parser": "babel-eslint",
@@ -63,13 +64,19 @@
6364
"babel-eslint": "^7.2.3",
6465
"babel-plugin-lodash": "^3.2.11",
6566
"cross-env": "^5.0.2",
67+
"cross-spawn": "5.1.0",
6668
"eslint-config-prettier": "^2.3.0",
6769
"eslint-plugin-react": "^7.1.0",
6870
"husky": "^0.14.3",
6971
"lint-staged": "^4.0.2",
70-
"now-travis": "1.0.1",
72+
"normalize-url": "1.9.1",
73+
"now": "8.3.10",
74+
"octonode": "0.9.1",
7175
"prettier": "^1.7.0",
76+
"travis-after-all": "1.4.5",
77+
"url-regex": "4.1.1",
7278
"webpack-bundle-analyzer": "^2.8.3",
73-
"xo": "^0.18.2"
79+
"xo": "^0.18.2",
80+
"yargs": "9.0.1"
7481
}
7582
}

0 commit comments

Comments
 (0)