Sha256: 5790082d8590afe0e62e9ba0753d3aa8b9bc55d983829698f5bfa6ff7ea1239a

Contents?: true

Size: 388 Bytes

Versions: 9

Compression:

Stored size: 388 Bytes

Contents

// Run this example by adding <%= javascript_pack_tag "hello_elm" %> to the head of your layout
// file, like app/views/layouts/application.html.erb. It will render "Hello Elm!" within the page.

import Elm from './Main'

document.addEventListener('DOMContentLoaded', () => {
  const target = document.createElement('div')

  document.body.appendChild(target)
  Elm.Main.embed(target)
})

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
webpacker-for-component-1.1.0 lib/install/examples/elm/hello_elm.js
webpacker-3.0.1 lib/install/examples/elm/hello_elm.js
webpacker-3.0.0 lib/install/examples/elm/hello_elm.js
webpacker-react-on-rails-3.0.0.rc.1 lib/install/examples/elm/hello_elm.js
webpacker-react-on-rails-2.0 lib/install/examples/elm/hello_elm.js
webpacker-legacy-0.1.2 lib/install/examples/elm/hello_elm.js
webpacker-legacy-0.1.1 lib/install/examples/elm/hello_elm.js
webpacker-legacy-0.1.0 lib/install/examples/elm/hello_elm.js
webpacker-2.0 lib/install/examples/elm/hello_elm.js