mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Split tests into ESM and CJS to ensure it works on both environments.
The changes are mostly:
1. Split tests into two
2. Add `-esm` and `-cjs` for each
3. Add `packageJson: { type: 'module' }` to `-esm` test
4. Renamed `tsconfig.json` -> `tsconfig.test.json`
Added more fixtures to test `import-from-node-modules`.
x-ref: https://github.com/vercel/next.js/pull/83134/files#diff-1a4138af8d7d9ec956653ae76ede7eaa8b1f701931dc302f039fa4e770ef61afR3
21 lines
382 B
TypeScript
21 lines
382 B
TypeScript
import type { NextConfig } from 'next'
|
|
import cjs from './fixtures/cjs.cjs'
|
|
import mjs from './fixtures/mjs.mjs'
|
|
import cts from './fixtures/cts.cts'
|
|
import mts from './fixtures/mts.mts'
|
|
import ts from './fixtures/ts'
|
|
import js from './fixtures/js-esm'
|
|
|
|
const nextConfig: NextConfig = {
|
|
env: {
|
|
cjs,
|
|
mjs,
|
|
cts,
|
|
mts,
|
|
ts,
|
|
js,
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|