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
is it possible for html-webpack-plugin to output an ejs file? #551
Comments
Yes |
Could you elaborate on how? |
Just use a loader like the raw loader which doesn't interfere with ejs |
@jantimon - it seems that the default loader won't work with an EJS template. Webpack tries to interpret all the EJS template variables. This example has a variable that is meant to be substituted by EJS, but webpack is interpreting it. Starting "template":
When you try to run webpack:
|
@donpinkus as written before you can use the raw-loader: https://github.com/webpack-contrib/raw-loader for the template e.g. |
what i actually did is have my simple nodejs server rename the normal html file to ejs then render that
|
@seanyu4296 Check this I don't know, why @jantimon suggested raw-loader. I'm using html plugin in following way,
And |
Oh i don't use raw-loader and i don't hard code my bundle.js.
|
lol.. This seems to be a good hack for me.
Anyways this isn't a problem for me. But what's your output extension of .ejs file? Mine Also, just FYI, EDIT: I got the solution |
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. |
No description provided.
The text was updated successfully, but these errors were encountered: