-
Notifications
You must be signed in to change notification settings - Fork 79
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
BUG Fix missing dist images #1031
BUG Fix missing dist images #1031
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this locally and it fixes the problem. However, I don't think it fully addresses the problem.
Maybe this is a bad assumption on my part, but I've always assumed that I should be able to delete the client/dist
and rebuild my library without consequences. If that's correct, then we should update the webpack config to auto copy files from the client/src/images
directory to client/dist/images
.
This is probably how this bug got introduced in the first place ... someone deleted their dist
folder and didn't realised the images were gone.
Just pushed an update to auto copy the |
@@ -65,7 +65,7 @@ before_script: | |||
- if [[ $BEHAT_TEST ]]; then (vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php &> artifacts/serve.log &); fi | |||
|
|||
# Install NPM dependencies | |||
- if [[ $NPM_TEST ]]; then nvm install && nvm use && npm install -g yarn && yarn install --network-concurrency 1 && (cd vendor/silverstripe/admin && yarn install --network-concurrency 1) && yarn run build; fi | |||
- if [[ $NPM_TEST ]]; then rm -rf client/dist && nvm install && nvm use && npm install -g yarn && yarn install --network-concurrency 1 && (cd vendor/silverstripe/admin && yarn install --network-concurrency 1) && yarn run build; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By completely deleting the client/dist
directory before the build, we make sure the build completely rebuild the dist folder.
5732f81
to
f78b7a5
Compare
@@ -54,6 +54,7 @@ | |||
"@storybook/addons": "^3.4.11", | |||
"@storybook/react": "^3.4.11", | |||
"babel-jest": "^23.6.0", | |||
"copy-webpack-plugin": "^4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest version of "copy-webpack-plugin" is 5, but it's not compatible with webpack 2.
Thanks fellows, nice work both of you :) |
Fixes #953
Just copied these from src/images to dist/images fixes the issue.