File tree Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @react-email/preview-server " : patch
3+ ---
4+
5+ fix unwanted dependency installation when typescript's not installed
Original file line number Diff line number Diff line change 1- import type { NextConfig } from 'next' ;
2-
3- const nextConfig : NextConfig = {
1+ /**
2+ * @type {import('next').NextConfig }
3+ */
4+ const nextConfig = {
45 serverExternalPackages : [ 'esbuild' ] ,
56 // Noticed an issue with typescript transpilation when going from Next 14.1.1 to 14.1.2
67 // and I narrowed that down into this PR https://github.com/vercel/next.js/pull/62005
Original file line number Diff line number Diff line change 4040 " **/*.ts" ,
4141 " **/*.tsx" ,
4242 " .next/types/**/*.ts" ,
43- " .next/dev/types/**/*.ts"
43+ " .next/dev/types/**/*.ts" ,
44+ " next.config.mjs"
4445 ],
4546 "exclude" : [" .next" , " dist" , " node_modules" ]
4647}
Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ const setNextEnvironmentVariablesForBuild = async (
7676 builtPreviewAppPath : string ,
7777) => {
7878 const nextConfigContents = `
79- const path = require( 'path') ;
79+ import path from 'path';
8080const emailsDirRelativePath = path.normalize('${ emailsDirRelativePath } ');
8181const userProjectLocation = '${ process . cwd ( ) . replace ( / \\ / g, '/' ) } ';
8282/** @type {import('next').NextConfig} */
83- module.exports = {
83+ const nextConfig = {
8484 env: {
8585 NEXT_PUBLIC_IS_BUILDING: 'true',
8686 EMAILS_DIR_RELATIVE_PATH: emailsDirRelativePath,
@@ -95,12 +95,12 @@ module.exports = {
9595 experimental: {
9696 webpackBuildWorker: true
9797 },
98- }` ;
98+ }
9999
100- await fs . promises . rm ( path . resolve ( builtPreviewAppPath , './next.config.ts' ) ) ;
100+ export default nextConfig` ;
101101
102102 await fs . promises . writeFile (
103- path . resolve ( builtPreviewAppPath , './next.config.js ' ) ,
103+ path . resolve ( builtPreviewAppPath , './next.config.mjs ' ) ,
104104 nextConfigContents ,
105105 'utf8' ,
106106 ) ;
You can’t perform that action at this time.
0 commit comments