Skip to content

An example repo of an error I'm seeing when trying to render a React component that imports CSS into the index.html using HtmlWebpackPlugin

Notifications You must be signed in to change notification settings

calumjames/htmlwebpackplugin-error-react-rendering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An example app to demonstrate an error I'm seeing when trying to import SCSS into the React component being rendered into the index.html by HtmlWebpackPlugin.

Run the following commands inside the folder you clone:

npm install
npm start

Then navigate to localhost:3001.

As can be seen in branch no-loading-css, if the line that imports the SCSS in the Loading component is commented out, the app runs fine and the component is rendered into the resulting index.html. When that line is commented out, you see the following error:

Error: /Users/calumjames/htmlwebpackplugin-error-react-rendering/tools/webpack/indexRenderer:5396
return window && document && document.all && !window.atob;
^
ReferenceError: window is not defined

About

An example repo of an error I'm seeing when trying to render a React component that imports CSS into the index.html using HtmlWebpackPlugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published