M
M
Miruz2018-03-15 12:25:58
webpack
Miruz, 2018-03-15 12:25:58

How to change folder from dist to /xxx/yyy in webpack 4?

Actually a subject. Tried to write in config

output: {
  path: "/ххх/ууу/",
}

but it throws an error on the command. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Miruz, 2018-03-18
@miruz

Can anyone help specifically write for such a structure? Something I can not understand at all what I'm stupid about.
/
| node_modules
| src
|--index.js
| public
|--scripts
|----output.js

const path = require('path');
module.exports = {
    entry: './src/index.js',
    output: {
        path: path.resolve(__dirname, 'public/scripts'),
        filename: 'output.js'
    }
}

S
Sergey Epifanov, 2018-03-15
@kacheleff

I guess you can try doing this:

output: {
  path: path.resolve(__dirname, "ххх/ууу")
}

well, in general, you need to look at what kind of error

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question