Skip to content

Instantly share code, notes, and snippets.

@wochap
Last active July 8, 2016 15:43
Show Gist options
  • Save wochap/5e22fd586619867d352806da404d58ca to your computer and use it in GitHub Desktop.
Save wochap/5e22fd586619867d352806da404d58ca to your computer and use it in GitHub Desktop.
vue cli webpack fixes

Vue cli webpack fixes

# index.js - /config/index.js

assetsPublicPath: '/',

// to

assetsPublicPath: 'http://localhost:8080/',
# dev-client.js - /build/dev-client.js

var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')

// to

var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true&path=http://localhost:8080/__webpack_hmr')
<!-- before body close tag add this -->

<script src="http://localhost:8080/app.js"></script>

Replace localhost with your own IP address, if you want see on your devices

@wochap
Copy link
Author

wochap commented Jun 27, 2016

  resolve: {
    alias: {
      'src': path.resolve(__dirname, '../src')
    },
    modulesDirectories: ['node_modules', 'shared']
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment