Skip to content

Upgrade to Webpack 5 #192

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

Merged
merged 4 commits into from
Jun 1, 2022
Merged

Upgrade to Webpack 5 #192

merged 4 commits into from
Jun 1, 2022

Conversation

nickmoreton
Copy link
Contributor

Upgrade to Webpack 5 and also update all other dependencies

In https://github.com/torchbox/django-pattern-library/blob/main/pattern_library/static/pattern_library/src/js/components/syntax-highlighting.js

initHighlightingOnLoad() has been changed to highlightAll()

I have also refactored the exported function which didn't work when upgrading highlight.js to v11 +

Fixes #183 in part.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have added an appropriate CHANGELOG entry

Copy link
Member

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @nickmoreton! All working as expected as far as I can see. It seems we could remove more from the Webpack configuration with this Highlight.js release, so I’ll add that on top of your changes.

});
hljs.registerLanguage('django', django);
hljs.registerLanguage('yaml', yaml);
hljs.highlightAll();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, it seems the webpack.config.js overrides for highlight.js are now irrelevant.

@thibaudcolas thibaudcolas merged commit 21ae3ad into torchbox:main Jun 1, 2022
@nickmoreton nickmoreton deleted the upgrade-webpack branch June 7, 2022 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Webpack 5 & external CSS file
2 participants