Published library not working, but works in modules

Posted on
  • Hi,

    I've been working on a little framework around my application - so far it's actually worked out pretty well, but I've hit an issue when I publish it and try to use it remotely.

    The code is here: https://github.com/tanepiper/watchmaker-­js - I've tried to configure the nx tooling as best I can, although I'm using their umd/esm builder it's configured with rollup to output for node.

    The published file is here: https://unpkg.com/watchmaker-js@0.0.5/wa­tchmaker-js.umd.js

    Now when I try load this with require, I get an error - but if I take this file and put it in my modules directory it works fine can call it watchmaker-js.min.js it works fine!

    The error is:

    espruinotools.js:2872 Uncaught (in promise) SyntaxError: Unexpected character '§'

    I was wondering if anyone had any experience with this, or might know what is causing this?

    (And if you want to see how it's used - the app code is here https://github.com/tanepiper/BangleApps/­blob/master/apps/moods/moods.js)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Published library not working, but works in modules

Posted by Avatar for tanepiper @tanepiper

Actions