Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy static to dist folder for prod (#1057) #36

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"@testing-library/user-event": "13.4.1",
"axios-mock-adapter": "1.20.0",
"codecov": "3.8.3",
"copy-webpack-plugin": "^11.0.0",
"es-check": "6.0.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"glob": "7.2.0",
Expand Down
13 changes: 13 additions & 0 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
const path = require('path');
const { getBaseConfig } = require('@edx/frontend-build');
const CopyPlugin = require('copy-webpack-plugin');

const config = getBaseConfig('webpack-prod');

config.plugins.push(
new CopyPlugin({
patterns: [
{
from: path.resolve(__dirname, './public/static'),
to: path.resolve(__dirname, './dist/static'),
},
],
}),
);

// Filter plugins in the preset config that we don't want
function filterPlugins(plugins) {
const pluginsToRemove = [
Expand Down
Loading