generated from json-schema-org/repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add webpack configuration and output options to
next.config
- Loading branch information
1 parent
0671cfd
commit c366f9d
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
const nextConfig = { | ||
|
||
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { | ||
config.module.rules.push( | ||
{ | ||
test: /\.md$/, | ||
// This is the asset module. | ||
type: 'asset/source', | ||
} | ||
) | ||
return config | ||
}, | ||
|
||
output:process.env.HOST !=="GitHub" ? "standalone" : "export", | ||
basePath:process.env.HOST !== "GitHub" ? "" : "/tour" | ||
|
||
|
||
}; | ||
|
||
export default nextConfig; |