As I was editing my project, I was looking to be able to import/export React components in my project rather than have one giant React file. The Glitch react-starter did not allow me to do import/export so I used the webpack, webpack.config, and package.json from the React-Webpack-Babel Community Boilerplate.
Everything was working great! Until I was told to type “refresh” in the console and my index.html and style.css file got deleted! I coded them up again and my project was able to go live! But when I edited my
react.jsx file, the project again deleted my index.html and style.css!
Can anyone tell me as to why this happens? The only code I put in the index.html is the basic
<!Doctype> setup and the only thing I add is a link to bootstrap, my css file, and at the bottom of the
<body> I link the
bundle.js so everything from react is loaded into index.html.
I do not know how to properly use webpack, only just started using it and google all the code errors until all is fixed… So sorry if its a webpack newbie problem.