-
Notifications
You must be signed in to change notification settings - Fork 590
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
Fix syntax highlighting #1142
Fix syntax highlighting #1142
Conversation
@sebdesign did you test this? I can't compile our assets anymore when I run
|
Yes I did compile it and tested it against a laravel app locally. I will make a clean installation right now to see if I can reproduce this. |
@driesvints I assume you did run I made a clean installation and I works (Ubuntu 18.04, node 14.18.1, npm 8.1.2). |
I did. I'm on macOS Monterey, Node v17.0.1, NPM 8.1.0. If we're not able to figure this out we'll need to revert this so we're unblocked for now. |
Could you try deleting the |
I could rollback highlight.js 11.x -> 10.x since, it's the only dependency that changed. |
@sebdesign deleting node modules didn't help. All three dev/watch/prod failed. |
Ok, I'll undo the changes on package.json and package-lock.json. The rest of the changes can stay. Give me a few minutes. |
@driesvints Running |
ah good find. I'll do it later this week, all good 👍 |
This PR fixes the syntax highlighting issues on the queries and the exceptions.
The syntax highlighting on the SQL code wasn't working at all:
Before
After
There was no syntax highlighting on the exception code preview:
Before
After
I've updated highlight.js from 10.x to 11.x and added some css classes.
Also, I've reduced the bundle size by updating an outdated webpack configuration.
The
webpack.IgnorePlugin
has changed its syntax since it was added in 2018.So now the bundle is reduced from 1128kb to 894kb!
See: https://webpack.js.org/plugins/ignore-plugin/#example-of-ignoring-moment-locales
I will also submit a PR in Horizon which uses the same configuration for webpack.IgnorePlugin.