aframe-super-hot-loader icon indicating copy to clipboard operation
aframe-super-hot-loader copied to clipboard

Error when building example project

Open mwbeene opened this issue 5 years ago • 2 comments

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!

mwbeene avatar Aug 31 '20 20:08 mwbeene

Having the same issue, any resolution?

JonLevin25 avatar Mar 28 '22 18:03 JonLevin25

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});
};

PeteHaughie avatar Feb 13 '24 13:02 PeteHaughie