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

html-webpak-plugin templates #53

Closed
jantimon opened this issue Jun 7, 2015 · 7 comments
Closed

html-webpak-plugin templates #53

jantimon opened this issue Jun 7, 2015 · 7 comments

Comments

@jantimon
Copy link

jantimon commented Jun 7, 2015

Hi,

I just came across this repo and saw that you are preferring setting all scripts/links using blueimp over the inject option.
Is there a specific reason for it because I believe that the inject options simplifies the app development a lot?

https://github.com/survivejs/webpack_react/blob/master/project_source/05_webpack_and_react/kanban_app/app/index.tpl

Could easily be

https://github.com/ampedandwired/html-webpack-plugin/blob/master/default_inject_index.html

@bebraw
Copy link
Member

bebraw commented Jun 7, 2015

Cool, thanks for pointing that out! I'll get this fixed.

@bebraw bebraw closed this as completed in f65fcae Jun 7, 2015
@bebraw
Copy link
Member

bebraw commented Jun 7, 2015

@jantimon Thanks! I simplified the section a lot (realized no template is needed in this case). Speaking of which is there a nice way to generate dev server index.html through html-webpack-plugin dynamically? It's not nice having to drag that in the project.

@jantimon
Copy link
Author

jantimon commented Jun 7, 2015

Hm actually I meant you might want to use inject:true for custom templates but this also a simpler approach ;)
I don't understand however what you mean by dynamically generated dev files - the plugin adds it to the webpack assets. So it should be there on the dev server too. Is it missing?

@bebraw
Copy link
Member

bebraw commented Jun 7, 2015

Hm actually I meant you might want to use inject:true for custom templates ;)

Ah. Anyway, much simpler now. 👍

I don't understand however what you mean by dynamically generated dev files - the plugin adds it to the webpack assets. So it should be there on the dev server too. Is it missing?

If you look at my boilerplate, you can see there's dev-server/index.html hanging around. That's something I want to eliminate. I have a feeling export-files-webpack-plugin might be needed here. Just playing around with this.

@bebraw
Copy link
Member

bebraw commented Jun 7, 2015

If you check out that plugin, you can see the core of the issue:

You might use some file-generating plugins on production (e.g. HTML Webpack Plugin), but it would be useless on development, as dev-server is not actually saving any files on the disk.

@jantimon
Copy link
Author

jantimon commented Jun 7, 2015

Should not be needed should work right away without your dev-server/index.html just open the index.html in the same folder where your javascript is

@bebraw
Copy link
Member

bebraw commented Jun 7, 2015

@jantimon Can you hit me through gitter? Opened a chat there. We can probably resolve the issue faster that way. Likely just missing something simple here.

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

2 participants