-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
bughelp welcomeCould use help from communityCould use help from communitypackage/buildIssues relating to npm or packagingIssues relating to npm or packaging
Milestone
Description
Loading via SystemJS in AMD used to work with v9.18.1. Broken in v10:
system.js:4 Uncaught (in promise) ReferenceError: hljs is not defined
at eval (highlight.js:1566)
at eval (highlight.js:6322)
at eval (<anonymous>)
at Qe (system.js:4)
at system.js:4
at async Promise.all (:63342/Kidoju.Widgets/src/js/widgets/index 10)
hljs is undefined when calling L1566
hljs.registerLanguage('apache', function () {
...
}());
In System.config.js, I have:
packages: {
'src/js': {
defaultExtension: 'js',
meta: {
'*.js': {
babelOptions: {
es2015: false,
stage2: false,
stage3: false,
},
format: 'amd',
},
'*.es6': {
format: 'esm',
},
'*.jsx': {
format: 'esm',
},
'*.mjs': {
format: 'esm',
},
},
},
},
A workaround for now is to add an exception in meta:
'vendor/highlight/highlight.js': {
// Note: AMD broken as of v10
format: 'global',
},
Metadata
Metadata
Assignees
Labels
bughelp welcomeCould use help from communityCould use help from communitypackage/buildIssues relating to npm or packagingIssues relating to npm or packaging