@@ -276,16 +276,6 @@ const getRouteModuleExports = async (
276
276
return exportNames ;
277
277
} ;
278
278
279
- const showUnstableWarning = ( ) => {
280
- console . warn (
281
- colors . yellow (
282
- colors . bold (
283
- "\n ⚠️ Remix support for Vite is unstable and\n not yet recommended for production\n"
284
- )
285
- )
286
- ) ;
287
- } ;
288
-
289
279
const getViteMajorVersion = ( ) : number => {
290
280
let vitePkg = require ( "vite/package.json" ) ;
291
281
return parseInt ( vitePkg . version . split ( "." ) [ 0 ] ! ) ;
@@ -723,14 +713,6 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
723
713
buildStart ( ) {
724
714
invariant ( viteConfig ) ;
725
715
726
- if (
727
- viteCommand === "build" &&
728
- // Only show warning on initial client build
729
- ! viteConfig . build . ssr
730
- ) {
731
- showUnstableWarning ( ) ;
732
- }
733
-
734
716
if (
735
717
viteCommand === "build" &&
736
718
viteConfig . mode === "production" &&
@@ -739,26 +721,24 @@ export const remixVitePlugin: RemixVitePlugin = (options = {}) => {
739
721
) {
740
722
viteConfig . logger . warn (
741
723
colors . yellow (
742
- colors . bold ( " ⚠️ Source maps are enabled in production\n" ) +
724
+ "\n" +
725
+ colors . bold ( " ⚠️ Source maps are enabled in production\n" ) +
743
726
[
744
727
"This makes your server code publicly" ,
745
728
"visible in the browser. This is highly" ,
746
729
"discouraged! If you insist, ensure that" ,
747
730
"you are using environment variables for" ,
748
731
"secrets and not hard-coding them in" ,
749
- "your source code.\n " ,
732
+ "your source code." ,
750
733
]
751
734
. map ( ( line ) => " " + line )
752
- . join ( "\n" )
735
+ . join ( "\n" ) +
736
+ "\n"
753
737
)
754
738
) ;
755
739
}
756
740
} ,
757
741
configureServer ( viteDevServer ) {
758
- viteDevServer . httpServer ?. on ( "listening" , ( ) => {
759
- setTimeout ( showUnstableWarning , 50 ) ;
760
- } ) ;
761
-
762
742
setDevServerHooks ( {
763
743
// Give the request handler access to the critical CSS in dev to avoid a
764
744
// flash of unstyled content since Vite injects CSS file contents via JS
0 commit comments