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

Allow using a loader #10

Closed
Couto opened this issue Jan 24, 2015 · 6 comments
Closed

Allow using a loader #10

Couto opened this issue Jan 24, 2015 · 6 comments

Comments

@Couto
Copy link

Couto commented Jan 24, 2015

I'm not sure if this is a useful idea for other people, but it happens that my index.html file already contains some images. It would be nice to add the images to webpack's dependency graph.

Is it possible to use the html-loader in conjunction with this plugin? Or is this idea too farfetched?

Once again, thanks.

@ampedandwired
Copy link
Collaborator

This is a pretty interesting idea - I like it. To be honest I'm not too sure if it's possible, but I'll definitely take a look into it.

The webpack stats object actually contains the compiled code for each asset as a string, so conceivably we could take the output of the html-loader and use it as an input template into this plugin.

@andersekdahl
Copy link

I'd really like this as well. I want to add an apple-touch-icon link icon in index.html, and I currently have to require that in JS (even though JS doesn't use it) to force it into the pipeline, and then iterate over all modules in my html template to get the correct path for that file. I'd much rather be able to just do {% o.require('./myimage.png') %} in my template.

@SimenB
Copy link
Contributor

SimenB commented May 8, 2015

@andersekdahl Could you post your template? I need a favicon, and I'm thinking this is the "best" way.
Ref #28

@jantimon
Copy link
Owner

So #41 allows to use loaders - could someone please give me some feedback on it?

@jantimon
Copy link
Owner

You can use the beta branch: npm install html-webpack-plugin@2 --save-dev

@lock
Copy link

lock bot commented Jun 1, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants