Webpack is generating the manifest.js files in a different folder

Asked

Viewed 34 times

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 search in the root path.

Where in the webpack configuration I set this configuration?

I’m using the Vue-cli.

1 answer

0


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

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

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

and changed to that

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

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

Worked.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.