Skip to content

Commit

Permalink
build: enable user dir access for local webpack instance (#190)
Browse files Browse the repository at this point in the history
Small QOL update to allow local webpack instances to access files within
the `/user/webpack` directory inside the git root. This is so user files
(resources/sound files, etc.) can be accessed regardless of whether an
overlay is pointed to a local plugin install or webpack.

(NB: Although webpack_dev does have access to the /resources dir, that
dir is tracked for git updates whereas /user is not.)
  • Loading branch information
wexxlee authored Jul 22, 2024
1 parent 2ab6fb2 commit bd77b71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ will immediately update the overlay,
prompting a refresh within the overlay itself.
This is the recommended approach of validating local code changes.

For convenience, webpack has access to the `/user/webpack/` directory
inside your local git root.
You can use this directory to store assets for your persoonal user confiiguration (if any).
The `/user/` directory is also suppressed for change tracking by `/.gitignore`.

Alternatively, `npm run build` will locally create a production distribution
of cactbot. This shouldn't be necessary for developing
and will be slower than running `npm start` for validating changes,
Expand Down
4 changes: 4 additions & 0 deletions webpack/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export default (
from: 'ui/*/skins/**/*',
noErrorOnMissing: true,
},
{
from: 'user/webpack/**/*',
noErrorOnMissing: true,
},
{
from: 'util/coverage/missing_translations*.html',
},
Expand Down

0 comments on commit bd77b71

Please sign in to comment.