feat: copy static to dist folder for prod (#1057)

* feat: copy static to dist folder for prod

* chore: update webpack.prod.config.js

Co-authored-by: Ben Warzeski <bwarzeski@edx.org>

Co-authored-by: Ben Warzeski <bwarzeski@edx.org>
This commit is contained in:
leangseu-edx
2023-01-25 14:29:00 -05:00
committed by GitHub
parent 69ff5463b3
commit cb9e0aa52f
3 changed files with 223 additions and 0 deletions

18
webpack.prod.config.js Normal file
View File

@@ -0,0 +1,18 @@
const path = require('path');
const { createConfig } = require('@edx/frontend-build');
const CopyPlugin = require('copy-webpack-plugin');
const config = createConfig('webpack-prod');
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: path.resolve(__dirname, './public/static'),
to: path.resolve(__dirname, './dist/static'),
},
],
}),
);
module.exports = config;