-
-
Notifications
You must be signed in to change notification settings - Fork 256
Can I get module name in filename template placeholders? #144
Comments
@ThomasSoloist Did you try
|
@michael-ciniawsky I have set the loader in webpack such as But I need the html file name is same as the webpack entry module name when output. Like I require the html file in the entry of 'about' module, then the html file will output with the name of 'about.html'. Can file-loader do that? Thanks. |
@michael-ciniawsky Eh, I have find a same feature request in issue #114 (#114) that we all need to output the files or folders with the name based on entry modules. Should I close this issue? Thank you again. |
@ThomasSoloist Yep I will triage this at #114 then :), please feel free to join discussion there |
I set up webpack's entry property like:
In index.js, I use html-loader to require html files, And use extract-loader & file-loader to out put html files, such as
And I want to use the module name (that set up in webpack's 'entry' property) to out put the html files.
maybe it will like:file-loader?name=[module].[ext]!extract-loader!html-loader, and output is "about.html"
So that it will be: module entry js file auto stand for a same name html file.
Thanks for your time.
And my English is awful, so I made a picture so that can make it easier to understand.
Thanks.
The text was updated successfully, but these errors were encountered: