aframe-super-hot-loader
aframe-super-hot-loader copied to clipboard
Error when building example project
Hi there, I'm getting the following issue when I try to install:
ERROR in ./src/scene.html 1:14
Module parse failed: Bad escape sequence in untagged template literal (1:14)
File was processed with these loaders:
* ./node_modules/aframe-super-hot-html-loader/index.js
* ./node_modules/super-nunjucks-loader/index.js
* ./node_modules/html-require-loader/index.js
You may need an additional loader to handle the result of these loaders.
> const html = `<a-scene environment="preset: forest; seed: 123; shadowSize: 5">
| <!-- <require path="C:\directory-to\aframe-super-hot-loader\example\src\templates\assets.html"> -->
| <a-assets>
@ ./src/index.js 10:0-23
Here are the steps I followed:
$ git clone https://github.com/supermedium/aframe-super-hot-loader
$ cd aframe-super-hot-loader/example
$ npm install
$ npm run start
I'm pretty new to webpack so I'm not sure if I'm missing a step.
Thanks!
Having the same issue, any resolution?
Create a folder called src in the root of your project, put a file called index.js inside it.
The contents of this file should be:
const Nunjucks = require('nunjucks');
const path = require('path');
const nunjucks = Nunjucks.configure(__dirname, {noCache: true});
module.exports = function (source) {
return nunjucks.render('hot.template.js', {html: source});
};