GithubHelp home page GithubHelp logo

Comments (9)

trusktr avatar trusktr commented on July 26, 2024

I made a reproduction here: https://github.com/trusktr/infamous/tree/Rich-Harris-buble-issue-85

To reproduce run npm i && npm run build-global.

from buble.

adrianheine avatar adrianheine commented on July 26, 2024

Your actual error:

Tagged template strings are not supported. Use transforms: { templateString: false } to skip transformation and disable this error, or transforms: { dangerousTaggedTemplateString: true } if you know what you're doing (38:33)

from buble.

adrianheine avatar adrianheine commented on July 26, 2024

If you update your bublé dependency you should get the actual error.

from buble.

trusktr avatar trusktr commented on July 26, 2024

Ah, I see, it was just an unhelpful error message. I'll update, and use Babel for that.

from buble.

adrianheine avatar adrianheine commented on July 26, 2024

You can definitely use tagged template strings with bublé, it just doesn't provide a raw property, which probably most tag functions don't use.

from buble.

trusktr avatar trusktr commented on July 26, 2024

Hehe, funny thing is I'm using the raw property to implement regexr which relies on raw to make it easy to compose RegExps with template strings without having to double-escape everything. f.e.

const r = require('regexr')
const number = r`${r.integer}|${r.digit}*\.${r.integer}|${r.integer}\.${r.digit}*`
const wholeStringNumber = r`^${number}$`

r.integer instanceof RegExp // true
number instanceof RegExp // true
wholeStringNumber instanceof RegExp // true

Yep, after updating the message is much more helpful:

[!] (buble plugin) CompileError: Tagged template strings are not supported. Use `transforms: { templateString: false }` to skip transformation and disable this error, or `transforms: { dangerousTaggedTemplateString: true }` if you know what you're doing (11:20)

from buble.

trusktr avatar trusktr commented on July 26, 2024

It'd be great if the playground was configurable so we can test out various options. f.e. wish this could work for just taking a look at what it does without having to go install stuff and do it from command line: https://buble.surge.sh/#function%20foo()%20%7B%7D%0Aconst%20f%20%3D%20foo%60asdfasdfasdf%60

from buble.

trusktr avatar trusktr commented on July 26, 2024

Ah, this is nice, a Rollup-in-browser fiddle with Buble: https://jsfiddle.net/rwk0qt4f/22 !

from buble.

LeeeeeeM avatar LeeeeeeM commented on July 26, 2024

For some users, rollup does not support the syntax (for .... of)

from buble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.