Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic html generation problem with webpack 3 #19

Open
ghost opened this issue Feb 28, 2018 · 1 comment
Open

dynamic html generation problem with webpack 3 #19

ghost opened this issue Feb 28, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 28, 2018

really appreciate your efforts and the information given within course. love it.

i followed course and wanted to use it in my react app whereas I used all latest perhaps except webpack, currently I am using webpack 3. did some minor changes in webpack config you mentioned earlier.
however strange thing is going on with injecting the <script tag src="bundle.js" dynamically when I am trying different routes except "/" i.e. public path.

for instance if i have

"/" => it injects the <script src="bundle.js"/>

"/seasons" => nothing is injected

not sure what is the reason, i thought maybe React-Router 4.0 is failing but I think it is actually from configuration things to do with HtmlWebpackPlugin. Since bundle.js not being injected.

Earlier I used in my old application two separate template files( dev, prod) so in production one i can do code splitting

please can you give me hand to identify my problem. for now I get back to my old configuration.
the video only shows generic configuration without putting React maybe i am doing something wrong.

@coryhouse
Copy link
Owner

Thanks! I suggest using the updated environment here as your foundation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant