Webpack is generating manifest.js files in a different folder

0

I'm using the webpack as Vue. When giving npm run build, the manifest.js file is created with the / static / path, while the other files are created with the static path /.

So if I put the application in a subfolder, for example, 127.0.0.1/webapp will point out that the file does not exist why it will look in the root path.

Where in the webpack configuration do I set this configuration?

I'm using vue-cli.

    
asked by anonymous 18.08.2018 / 15:57

1 answer

0

The index.js file in the "config / index.js" path was like this

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

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

And I changed it

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

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

It worked.

    
19.08.2018 / 01:14