I've created a React app that uses Google's Material Design Polymer components with react-polymer
. When running my app through the webpack-dev-server, all Polymer components are rendering properly.
But once I upload this to my Apache2 server on digitalocean, none of the components are rendering at all. I'm not receiving any network errors either of assets not being fetched. At first, I thought it was the mod_pagespeed that was stripping my styles and Polymer imports, but disabling it didn't help.
I've tried serving my site locally with a basic node.js server and again, the Polymer components aren't rendering.
I've also vulcanized my html file, embedding the imports right in. This same vulcanized file works successfully on my local webpack-dev-server, but again fails to render the polymer components on both my local node.js server and my Apache2 server on digitalocean.
What's so special about the webpack-dev-server that's allowing it the Polymer elements to render?
I'm sure I'm overlooking something extremely basic. Any help?
Dumb mistake. I figured out that
webpack-dev-server
was compiling everything to memory, but not to disk. I was running my older bundle.js file in all the other servers all along. Re-runningwebpack
to recompile everything fixed the problem.From the
webpack-dev-server
docs: