feat: add million to docs (#169)

This commit is contained in:
Rotimi Best
2024-02-16 21:11:12 +01:00
committed by GitHub
parent e57257108d
commit 5804c2ff5c
2 changed files with 10 additions and 1 deletions
+9 -1
View File
@@ -1,3 +1,5 @@
const million = require('million/compiler');
const env = process.env.NODE_ENV;
const withNextra = require('nextra')({
@@ -5,7 +7,7 @@ const withNextra = require('nextra')({
themeConfig: './theme.config.tsx'
});
module.exports = {
const nextConfig = {
basePath: env === 'production' ? '/docs' : undefined,
env: {
imagePath: env === 'production' ? '/docs' : ''
@@ -15,3 +17,9 @@ module.exports = {
},
...withNextra()
};
const millionConfig = {
auto: true
};
module.exports = million.next(nextConfig, millionConfig);
+1
View File
@@ -18,6 +18,7 @@
},
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
"dependencies": {
"million": "^3.0.3",
"next": "^13.0.6",
"nextra": "latest",
"nextra-theme-docs": "latest",