Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 954 Bytes

source_maps.md

File metadata and controls

22 lines (16 loc) · 954 Bytes

Source Maps

Source Map Demo

SourceMap Demo

It shows a exception during a page load. In the console tab of the browsers developer tools, the error message is then expanded and just by clicking on the shown file:line_numer link, the browser shows the ruby source code, where the exception occured.

Source Map Configuration

The opal-webpack-loader for webpack supports the following options to enable HMR: (These are options for the webpack config, not to be confused with the owl ruby project options further down below)

    loader: 'opal-webpack-loader',
    options: {
        sourceMap: true
    }
  • sourceMap : enable (true) or disable (false) source maps. Optional, default: false

Also source maps must be enabled in webpack. See webpack devtool configuration.