These are chat archives for opal/opal

Jun 2017
James Carlson
Jun 11 2017 19:48

An trying to use Opal in chrome. Am using Elm via webpack and have this code:

      var Opal = require("opal-webpack")
      var content = document.getElementById('rendered_text1').innerHTML
      // Have to define Opal somehow
      document.getElementById('rendered_text2').innerHTML = Opal.Asciidoctor.$convert(content)

but require gives me an error and my other tries have failed also. I've installed opal via npm and also via npm install opal-webpack --save-dev, then configuring like this:

        test:    /\.html$/,
        exclude: /node_modules/,
        loaders:  [
          test: /\.rb?$/,
          loader: 'opalrb-loader'