Skip to content

Commit cb9e0aa

Browse files
leangseu-edxBen Warzeski
andauthored
feat: copy static to dist folder for prod (openedx#1057)
* feat: copy static to dist folder for prod * chore: update webpack.prod.config.js Co-authored-by: Ben Warzeski <[email protected]> Co-authored-by: Ben Warzeski <[email protected]>
1 parent 69ff546 commit cb9e0aa

File tree

3 files changed

+223
-0
lines changed

3 files changed

+223
-0
lines changed

package-lock.json

Lines changed: 204 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"@testing-library/react": "12.1.5",
7272
"@testing-library/user-event": "13.5.0",
7373
"axios-mock-adapter": "1.20.0",
74+
"copy-webpack-plugin": "^11.0.0",
7475
"es-check": "6.2.1",
7576
"husky": "7.0.4",
7677
"jest": "27.5.1",

webpack.prod.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const path = require('path');
2+
const { createConfig } = require('@edx/frontend-build');
3+
const CopyPlugin = require('copy-webpack-plugin');
4+
5+
const config = createConfig('webpack-prod');
6+
7+
config.plugins.push(
8+
new CopyPlugin({
9+
patterns: [
10+
{
11+
from: path.resolve(__dirname, './public/static'),
12+
to: path.resolve(__dirname, './dist/static'),
13+
},
14+
],
15+
}),
16+
);
17+
18+
module.exports = config;

0 commit comments

Comments
 (0)