-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Passing in loader data? #77
Comments
You should set |
Thanks for the quick reply. Unless I'm missing something, seems like When I require a CSS file in a JS file
I've already required the css file in my JS, so I can use it in all my JS stuff, but I can't seem to find a way to pass this object to my templates. Am I making sense? |
This isn't possible right now - you have to generate the html using a javascript template language for that |
e.g. EJS or React |
Thanks, I was afraid of that. I was trying to take these templates than pass them over to Node.js for rendering on the server with React. Guess that's not going to work :/ |
You still can render webpack content on the server - but this plugin provides only a index.html not a templating solution |
I tried something like this in Node running Express: All I got was errors and all the loaders were definitely present in my package.json file as I'm able to use them in webpack for my front-end JS. Am I completely missing something? I've poured over Webpack docs and Stackoverflow and I'm just not finding many examples. |
Compile your javascript for http://webpack.github.io/docs/configuration.html#output-librarytarget |
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. |
So, I'm fairly new to Webpack, so hopefully this is a good place to ask this.
This request is sort of related to #10, but instead of passing in loader data directly I was hoping to pass it in as a property that can be accessed from the template. I was hoping to pass in my localized styles from css-loader. Something like this:
webpack.config:
main.html:
Unfortunately, I can't seem to find a configuration that allows me to process a loader in the config. Is this possible?
Thanks!
The text was updated successfully, but these errors were encountered: