mirror of
https://github.com/luxfi/market.git
synced 2026-09-24 00:25:57 +00:00
- Converted from pnpm workspace catalog references to fixed versions - Added GitHub Actions workflow for GitHub Pages deployment - Configured for static site export
59 lines
1.5 KiB
JavaScript
59 lines
1.5 KiB
JavaScript
const withMDX = require('@next/mdx')()
|
|
const svgrPluginConfig = require('./next-conf/svgr.next.config')
|
|
const watchPluginConfig = require('./next-conf/watch.next.config')
|
|
|
|
const env = process.env.NODE_ENV
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
output: 'export',
|
|
images: { unoptimized: true },
|
|
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
|
|
reactStrictMode: true,
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'img.youtube.com',
|
|
pathname: '**',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'cdn.lux.network',
|
|
pathname: '**',
|
|
},
|
|
{
|
|
protocol: "http",
|
|
hostname: "localhost",
|
|
}
|
|
],
|
|
},
|
|
// https://stackoverflow.com/questions/72621835/how-to-fix-you-may-need-an-appropriate-loader-to-handle-this-file-type-current
|
|
transpilePackages: [
|
|
'@hanzo/ui',
|
|
'@hanzo/auth',
|
|
'@hanzo/commerce',
|
|
'@luxfi/ui',
|
|
'@luxfi/data'
|
|
],
|
|
productionBrowserSourceMaps: true,
|
|
webpack: (config, { dev }) => {
|
|
let conf = svgrPluginConfig(config)
|
|
if (dev) {
|
|
//conf = watchPluginConfig(conf)
|
|
//https://github.com/vercel/next.js/discussions/33929
|
|
config.snapshot = {
|
|
...(config.snapshot ?? {}),
|
|
// Add all node_modules but @hanzo module to managedPaths
|
|
// Allows for hot refresh of changes to @hanzo module
|
|
managedPaths: [/^(.+?[\\/]node_modules[\\/])(?!@hanzo)/],
|
|
};
|
|
config.cache = false
|
|
}
|
|
return conf
|
|
|
|
}
|
|
}
|
|
|
|
module.exports = withMDX(nextConfig)
|