Static Assets export / import / require

Just trying to follow the example here:

I get this error:

Cannot find module 'assets/static/js/app' from '/'.

This is Chrome complaining about this script in app.html.eex


The tutorial states that:
Take notice of “assets/js/app”. This is not really a file name, this is the name of a module into which Brunch wrapped the code in “assets/js/app.js”

I’ve changed the script to “assets/js/app.js” instead, but no difference. My last thought is that the tutorial isn’t for 1.3(?)
This page is unavailable in Hex

I’d like to split my js into separate files, but I’d like to get the very simplest of examples working first! Any other tutorials covering this from first base?

Just as I post the request for help I find the answer
The script is

That isn’t that much a tutorial, thats a blog post introducing a new feature… Somewhere in the near to 1.0 area…

I’m not sure though how you can translate it to 1.3 though… At least I can tell for sure that it seems to be the old folder layout.

1 Like