[Vuejs]-Opening index.html over file:// from Vue-cli template

0👍

Change assetsPublicPath to ‘./’, then “npm run build”, and then you can open file:// in your browser.

  build: {
    // Template for index.html
    index: path.resolve(__dirname, '../dist/index.html'),

    // Paths
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: './',     

Leave a comment