Skip to content

import in webpack not working #15

@d4l3k

Description

@d4l3k

When I try to use it via webpack + Polymer 3 + typescript it throws the error:

index.ts:53 ReferenceError: hljs is not defined
    at Object../node_modules/@kuscamara/code-sample/vendor/highlight/highlight.pack.js (highlight.pack.js:formatted:1)
    at __webpack_require__ (bootstrap:767)
    at fn (bootstrap:130)
    at Module../node_modules/@kuscamara/code-sample/code-sample.js (highlight.pack.js:formatted:1)
    at __webpack_require__ (bootstrap:767)
    at fn (bootstrap:130)
    at Module../src/components/index-page/index.ts (indexPage.684e59f8986e2130e02b.chunk.js:76)
    at __webpack_require__ (bootstrap:767)
    at fn (bootstrap:130)

Code:

import '@kuscamara/code-sample/code-sample.js'

Full code https://github.com/d4l3k/feedlight/blob/cc770115d7b85cb3674d74c2610a9773d68b4be3/www/src/components/index-page/index.ts#L3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions