Skip to content

Change Style after packaging #45

Open
@byAaronLuo

Description

@byAaronLuo

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

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:

<template>
  <div>
    <highlightjs autodetect :code="code"></highlightjs>
  </div>
</template>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions