-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Assets serving changes #2296
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
Assets serving changes #2296
Conversation
… make sure all assets URLs are prefixed with /static/ and remove our custom assets serving handler.
webpack.config.js
Outdated
new CopyWebpackPlugin([ | ||
{ from: 'client/app/assets/robots.txt' }, | ||
{ from: 'client/app/assets/css/login.css', to: 'styles/login.css' }, | ||
{ from: 'client/app/assets/js/jquery.min.js', to: 'js/jquery.min.js' }, |
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.
Do we really need to store jquery.min.js
in app/assets
folder? We already have jquery and all pre-built bundles in node_modules
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.
Probably not. But then we need to create a new entry point that will export only jQuery?
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.
Can you try to replace from
path with node_modules/jquery/dist/jquery.min.js
? Will it work?
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.
Brilliant. Done 👍 96ad3aa
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.
I tried to review back-end code too, but since I'm not familiar with it - I may miss something. But in general everything looks good.
P.S. It's cool that you finally removed old css files from client/app/assets/css
👍
Thanks!
It's been long overdue. Next thing can be to create a dedicated login page CSS, but maybe it's better to load the large one to save download time on the next page? |
Some changes to the way we serve assets:
/static/
.Breaking change:
REDASH_STATIC_ASSETS_PATH
is a single value again and no longer supports multiple paths.Might help with #2209.