I'm trying to include raw Ruby/Elixir/Go/JavaScript code in a spectaclejs presentation.
I'm trying to use CodeSlide as follows:
const example_code = {
demo: require("raw!./assets/demo.example"),
};
<CodeSlide
transition={[]}
lang="elixir"
ranges={[]}
code={example_code.demo}
/>
I get this error in the browser:
./src/presentation.js
Line 58: Unexpected '!' in 'raw-loader!./assets/demo.example'. Do not use import syntax to configure webpack loaders import/no-webpack-loader-syntax
Same issue if I use "raw" instead of "raw-loader", just substitute raw for raw-loader.
I tried what was in this post, but it's not working - am I doing something wrong?
If I remove the "raw*" language from the require statement, I end up with
/static/media/demo.5b2de2fb.example
in the browser