File size: 355 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * This module is for next.js server internal usage of path module.
 * It will use native path module for nodejs runtime.
 * It will use path-browserify polyfill for edge runtime.
 */
let path

if (process.env.NEXT_RUNTIME === 'edge') {
  path = require('next/dist/compiled/path-browserify')
} else {
  path = require('path')
}

module.exports = path