File tree 1 file changed +2
-6
lines changed
crates/next-custom-transforms/src/transforms
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1855,8 +1855,6 @@ impl<C: Comments> VisitMut for ServerActions<C> {
1855
1855
for ( ident, export_name, ref_id) in self . exported_idents . iter ( ) {
1856
1856
if !self . config . is_react_server_layer {
1857
1857
if export_name == "default" {
1858
- self . comments . add_pure_comment ( ident. span . lo ) ;
1859
-
1860
1858
let export_expr = ModuleItem :: ModuleDecl ( ModuleDecl :: ExportDefaultExpr (
1861
1859
ExportDefaultExpr {
1862
1860
span : DUMMY_SP ,
@@ -1868,6 +1866,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
1868
1866
span : if self . config . is_react_server_layer
1869
1867
|| self . config . is_development
1870
1868
{
1869
+ self . comments . add_pure_comment ( ident. span . lo ) ;
1871
1870
ident. span
1872
1871
} else {
1873
1872
PURE_SP
@@ -1888,9 +1887,6 @@ impl<C: Comments> VisitMut for ServerActions<C> {
1888
1887
) ) ;
1889
1888
new. push ( export_expr) ;
1890
1889
} else {
1891
- let dummy_pure_span = Span :: dummy_with_cmt ( ) ;
1892
- self . comments . add_pure_comment ( dummy_pure_span. lo ) ;
1893
-
1894
1890
let export_expr =
1895
1891
ModuleItem :: ModuleDecl ( ModuleDecl :: ExportDecl ( ExportDecl {
1896
1892
span : DUMMY_SP ,
@@ -1918,7 +1914,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
1918
1914
. into( ) ,
1919
1915
) ,
1920
1916
init: Some ( Box :: new( Expr :: Call ( CallExpr {
1921
- span: dummy_pure_span ,
1917
+ span: PURE_SP ,
1922
1918
callee: Callee :: Expr ( Box :: new( Expr :: Ident (
1923
1919
create_ref_ident. clone( ) ,
1924
1920
) ) ) ,
You can’t perform that action at this time.
0 commit comments