renative icon indicating copy to clipboard operation
renative copied to clipboard

Source maps for web are not showing original code but ES5

Open vladinko0 opened this issue 2 years ago • 1 comments

Describe the bug Source maps for web are not showing original code but ES5

To Reproduce Steps to reproduce the behavior:

  1. Run command 'rnv new testproject'
  2. In wizard select renative-template-hello-world
  3. Run command 'npx rnv run -p web'
    • not needed to turn on source maps. They are there by default. It is caused by default next option devtool: eval-source-map of webpack.

Expected behavior Inspect the web (F12) and you can see original code of _app.js:

import React from 'react';
import { useRouter } from 'next/router';
import { View } from 'react-native';
import Menu from '../components/menu';
import { themeStyles, ThemeProvider } from '../config';

export default function MyApp({ Component, pageProps }) {
    const router = useRouter();
    return (
        <ThemeProvider>
            <Menu focusKey="menu" router={router} />
            <View style={themeStyles.appContainer}>
                <Component {...pageProps} />
            </View>
        </ThemeProvider>
    );
}

But I see ES5 code:

Screenshot 2023-01-02 at 08 45 09

Desktop (please complete the following information):

  • OS: [macOS 12.6]
  • Node Version [v16.14.2]
  • RNV Version [e.g. 0.35.4]

I created also clean next.js project and the source code is correct:

Screenshot 2023-01-04 at 10 22 44

vladinko0 avatar Jan 04 '23 09:01 vladinko0

Related to https://github.com/flexn-io/renative/issues/953

pauliusguzas avatar Jun 19 '23 14:06 pauliusguzas

this is no longer the issue in 1.0.0-rc.18.

ElenaDiachenko avatar May 14 '24 08:05 ElenaDiachenko