highlightjs / highlightjs/vue-plugin

Change Style after packaging

Open
#45 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
241
Forks
29
PR merge metrics
No merged PRs in 30d

Description

I have discovered a new issue based on issue # 44. When I customize an hljs object and the highlighted code I need is HTTP RESPONSE, the highlighted code in the production and development environments is different, as shown in the following two images. The first image is the development environment, which only highlights the HTML; The second image shows the production environment, which only highlights the HTTP response header. Why are the highlighted codes in the production and development environments different? How should I solve the problem of production environments being out of sync with development environments

image

image

ps:
Packaging tool: vue/cli 5.0.8
Dependency version: @highlightjs/vue-plugin:^2.1.2
main.js
```javascript
import 'highlight.js/styles/atom-one-dark.css'
import 'highlight.js/lib/common'
import hljs from 'highlight.js/lib/core'
import hljsVuePlugin from '@highlightjs/vue-plugin'
import javascript from 'highlight.js/lib/languages/javascript'
hljs.registerLanguage('javascript', javascript)
app.use(hljsVuePlugin)
```
SFC:
```html



```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.