Skip to content

Conversation

@lsharir
Copy link

@lsharir lsharir commented Jan 18, 2017

Hey Dustin,
I added this option so users can add tags into either the head or body regardless of the html-webpack-plugin settings

Also updated the readme to reflect those changes.

@DustinJackson
Copy link
Owner

I'm confused, why would you add this option if it already exists in html-webpack-plugin options?

@lsharir
Copy link
Author

lsharir commented Jan 19, 2017

This only injects the inlineSource files to the head.
Is there an option to do that with html-webpack-plugin?

@DustinJackson
Copy link
Owner

you can inject file into the head by using the inject: 'head' option

@lsharir
Copy link
Author

lsharir commented Jan 19, 2017

Is there an option to inject only the inlined content into the head? (while the rest .js files remain in the body)

I had a problem where I want to load my application in the body but inline some loader script in the head.

@AyWa
Copy link

AyWa commented Aug 28, 2017

@lsharir I have the same problem, did you find a clean way to do it ?
thx

@lsharir
Copy link
Author

lsharir commented Aug 28, 2017

@AyWa I havn't found a good solution using this plugin. However, I did find a way using .ejs templates for my html files, and htmlWebpackPlugin imports option (directly from a file)

Both usecases are demonstrated in this repo: https://github.com/lsharir/resume

The ejs file
https://github.com/lsharir/resume/blob/master/angular2/src/index.ejs
The webpack config containing relevant imports
https://github.com/lsharir/resume/blob/master/angular2/webpack.config.js

Good luck!

@AyWa
Copy link

AyWa commented Aug 28, 2017

@lsharir thx for your answer. I didn't want to use a template file, but it seems like I dont have choice.

best regards

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

Successfully merging this pull request may close these issues.

3 participants