chore(webpack-react): organize folder structure
This commit is contained in:
parent
2b05256770
commit
b7b1a9630f
|
@ -0,0 +1,10 @@
|
|||
import React from 'react';
|
||||
import Home from './pages/home';
|
||||
export default function App() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Auth0 with React.js</h1>
|
||||
<Home />
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import Home from './pages/home';
|
||||
import App from './app';
|
||||
//TODO remove debugging
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log('development mode');
|
||||
|
@ -10,4 +10,4 @@ import { createRoot } from 'react-dom/client';
|
|||
//create root container
|
||||
const root = createRoot(document.getElementById("root"));
|
||||
//render root app
|
||||
root.render(<Home />);
|
||||
root.render(<App />);
|
|
@ -4,7 +4,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||
const path = require('path');
|
||||
module.exports = {
|
||||
//bundle *.js from this entry point
|
||||
entry: path.resolve(__dirname, '../app/index.js'),
|
||||
entry: path.resolve(__dirname, '../app/index.jsx'),
|
||||
//create output file to be linked to index.html
|
||||
output: {
|
||||
filename: '[name].bundle.js',
|
||||
|
|
Loading…
Reference in New Issue