renative
renative copied to clipboard
Source maps for web are not showing original code but ES5
Describe the bug Source maps for web are not showing original code but ES5
To Reproduce Steps to reproduce the behavior:
- Run command 'rnv new testproject'
- In wizard select
renative-template-hello-world
- 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.
- not needed to turn on source maps. They are there by default. It is caused by default next option
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:
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:
Related to https://github.com/flexn-io/renative/issues/953
this is no longer the issue in 1.0.0-rc.18.