mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Turns string decode and parse errors into warnings for extensionless files when in tracing mode. A `require(dynamic)` inside of node_modules can easily end up pulling in extensionless files such as binary files, or `LICENSE`, which would fail the build.
11 lines
251 B
JavaScript
11 lines
251 B
JavaScript
import path from 'path'
|
|
|
|
const projectDir = process.cwd()
|
|
path.join(projectDir, 'data', 'static-from-pkg.txt')
|
|
path.join('data', 'static-from-pkg.txt')
|
|
|
|
globalThis.myDirname = __dirname
|
|
path.join(globalThis.myDirname, 'foo.txt')
|
|
|
|
export default 'foo'
|