Tweak script path to work locally and via server
authorGreg Hurrell <greg@hurrell.net>
Tue, 4 Aug 2015 06:29:55 +0000 (23:29 -0700)
committerGreg Hurrell <greg@hurrell.net>
Tue, 4 Aug 2015 06:29:55 +0000 (23:29 -0700)
This makes file:// URLs work and the webpack dev server at the same
time. I think this will work fine once I've uploaded this to a remote
host.

index.html
webpack.config.js

index 84c964fc4c632bfed300e7da89e5a75c45953abb..4045ad535e1ee3aff435b9d7f29f22c9dd7342fe 100644 (file)
@@ -6,6 +6,6 @@
   <body>
     <div id='root'>
     </div>
-    <script src="/static/bundle.js"></script>
+    <script src="dist/bundle.js"></script>
   </body>
 </html>
index 905d01601bdfb1b624a409722ddf84c0b288b4be..a11a45f90c042ef329208ae346583c035fcd18c1 100644 (file)
@@ -18,7 +18,7 @@ module.exports = {
   output: {
     path: path.join(__dirname, 'dist'),
     filename: 'bundle.js',
-    publicPath: '/static/'
+    publicPath: '/dist'
   },
   plugins: [
     new webpack.HotModuleReplacementPlugin(),