Answer the question
In order to leave comments, you need to log in
How to give assets through webpack to a specific directory?
My webpack is configured like this:
output: {
path: path.resolve(__dirname, './src/assets'),
publicPath: '/',
filename: 'build.js'
},
devServer: {
host: 'test.ru',
historyApiFallback: true,
noInfo: true,
overlay: true,
openPage: ''
}
Project is running at http://test.ru:80/
webpack output is served from /
404s will fallback to /index.html
Answer the question
In order to leave comments, you need to log in
need to be configured output.path
, for example, with this value
, all files will be in the dist folder, which is located next to webpack.config.js
The web server distributes files already from this folder path: path.join(__dirname, './dist')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question