Skip to content

Commit

Permalink
fix: jotai path configuration on windows (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
suemor233 authored May 31, 2024
1 parent 4825aef commit fec6f9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { execSync } from 'child_process'
import path from 'path'
import { fileURLToPath } from 'url'
import { config } from 'dotenv'

import NextBundleAnalyzer from '@next/bundle-analyzer'
Expand All @@ -11,6 +12,9 @@ process.title = 'Shiro (NextJS)'
const env = config().parsed || {}
const isProd = process.env.NODE_ENV === 'production'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)

let commitHash = ''
let commitUrl = ''
const repoInfo = getRepoInfo()
Expand Down Expand Up @@ -70,7 +74,6 @@ let nextConfig = {
},

webpack: (config, { webpack }) => {
const __dirname = new URL('./', import.meta.url).pathname
config.resolve.alias['jotai'] = path.resolve(
__dirname,
'node_modules/jotai',
Expand Down

0 comments on commit fec6f9b

Please sign in to comment.