Copy static dir during build

This commit is contained in:
Pawel Kowalski 2018-08-16 17:45:28 +02:00
parent b5a7e17ee0
commit dbc84964b6
3 changed files with 15 additions and 0 deletions

View File

@ -64,6 +64,13 @@ const devWebpackConfig = merge(baseWebpackConfig, {
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
]),
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.djangoAssetsSubDirectory,
ignore: ['.*']
}
])
]
})

View File

@ -115,6 +115,13 @@ const webpackConfig = merge(baseWebpackConfig, {
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
]),
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.djangoAssetsSubDirectory,
ignore: ['.*']
}
])
]
})

View File

@ -48,6 +48,7 @@ module.exports = {
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist'),
djangoAssetsSubDirectory: 'vstatic',
assetsSubDirectory: 'vstatic',
assetsPublicPath: '/',