-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Uninitialized converter using ES6 imports #2
Comments
@Mogztter, do you have any idea what causes this problem? |
Not really... it looks like I believe that this error is thrown when you import I will try to reproduce this error in an integration test. You are using Babel to compile ES6 modules to commonJS, right ? Please note that this warning can be safely ignored |
@grissius I found the root cause! import Asciidoctor from 'asciidoctor.js'
const asciidoctor = Asciidoctor();
import 'asciidoctor-html5s'; Babel will generate: 'use strict';
// import Asciidoctor from 'asciidoctor.js'
var _asciidoctor = require('asciidoctor.js');
var _asciidoctor2 = _interopRequireDefault(_asciidoctor);
// import 'asciidoctor-html5s';
require('asciidoctor-html5s');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// const asciidoctor = Asciidoctor();
var asciidoctor = (0, _asciidoctor2.default)(); As you can see One way to fix this issue is to convert import Asciidoctor from 'asciidoctor.js'
import AsciidoctorHTML5Semantic from 'asciidoctor-html5s';
const asciidoctor = Asciidoctor();
AsciidoctorHTML5Semantic(); @jirutka What do you think ? |
Another way to do it, is to use the Line 31 in 49449af
And then to explicitly load the module: require('asciidoctor.js')();
require('asciidoctor-html5s');
var Opal = require('opal-runtime');
Opal.load('asciidoctor-html5s'); |
Using backend with
import
statements, causes the following outputObject freezing is not supported by Opal
followed by error:This might be problem with all backends perhaps, first one I am using. Are backends in general usable for in browser usage with asciidoctor.js? I found no manual for backend usage.
Here is the change in my project that introduces the error: smolijar/emily-editor@5a22333
The text was updated successfully, but these errors were encountered: