https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • k

    kian

    04/12/2023, 11:34 AM
    It'll run with a max memory of 3MB so probably
  • k

    kian

    04/12/2023, 11:34 AM
    Not sure there's a whole lot you can do about that
  • h

    HardAtWork

    04/12/2023, 11:35 AM
    Might be an bug if it tries to load the entire thing when it doesn't match?
  • k

    kian

    04/12/2023, 11:38 AM
    Without reading the code itself, I imagine it's probably loading attribute & value to run it's checks rather than differentiating between selectors that only care about the attribute vs selectors that care about attribute and value
  • k

    kian

    04/12/2023, 11:38 AM
    but it's impossible to really work around that I guess?
  • k

    kian

    04/12/2023, 11:39 AM
    if you receive
    <div foo="bar">
    you're always going to get
    "bar"
  • k

    kian

    04/12/2023, 11:39 AM
    or if you decide 'skip to the next element' when it hits
    foo
    then it'll have to parse
    "bar"
    to find the end of the element
  • k

    kian

    04/12/2023, 11:40 AM
    > The tag scanner parses only the tag name and feeds it to the selector matcher. The matcher will switch parser to the lexer if there was a match or additional information about the tag (such as attributes) are required for matching.
  • m

    McAndze

    04/12/2023, 11:42 AM
    That's interesting, I think actually most of the elements I'm interested in are tags. I could give it a quick go with a more specific selector and see if that solves it
  • k

    kian

    04/12/2023, 11:42 AM
    Yeah - ideally it'll never read beyond
    div
    (and in this case, dying on the data attribute) if you don't have any selectors for the
    div
    tag
  • j

    Julius

    04/12/2023, 1:03 PM
    Hey guys! I'm working on my Worker app and I'm trying to connect it to my custom domain that is owned by my AWS account in Route 53. Is it true that there's no way to connect this domain to a CF Worker?
  • m

    McAndze

    04/12/2023, 1:42 PM
    Seems to work, thanks a lot for the help. Will require some changes, but can definitely work with this.
  • c

    chientrm

    04/12/2023, 1:48 PM
    I keep getting this error when using
    wrangler dev
    .
  • c

    chientrm

    04/12/2023, 1:49 PM
    it also block all devices in LAN and make the internet super slow even on another devices 😐
  • c

    chientrm

    04/12/2023, 1:51 PM
    Now I just can't use start dev 😐
  • j

    jessec

    04/12/2023, 5:48 PM
    Anyone happen to have an example of bringing in Buffer to a typescript project from node_compat without ignores or including all of node? Ex. https://blog.cloudflare.com/workers-node-js-asynclocalstorage/
    Copy code
    // @ts-ignore
    import { Buffer } from 'node:buffer';
  • j

    jessec

    04/12/2023, 5:50 PM
    The project is setup specifically for browser for the worker, trying to work out how I can bring in just node:buffer and its types without everything complaining.
  • s

    Skye

    04/12/2023, 5:51 PM
    Could you share your tsconfig?
  • s

    Skye

    04/12/2023, 5:51 PM
    My guess is the types aren't right
  • j

    jessec

    04/12/2023, 5:53 PM
    Got it in 1, added "@types/node" to the array and all errors went away.
  • j

    jessec

    04/12/2023, 5:53 PM
    Still getting used to typescript, thanks!
  • j

    jessec

    04/12/2023, 5:59 PM
    Dang, dies during the webpack build, more to figure out. :<
  • s

    Skye

    04/12/2023, 5:59 PM
    Unless you have a specific reason to use webpack, wrangler will just build it for you
  • j

    jessec

    04/12/2023, 6:02 PM
    Yeah, I use it for a few things and keep a base config around for special cases, it's not doing too much in this project so I could prob remove it, but I'd rather figure it out and keep it.
  • s

    Skye

    04/12/2023, 6:03 PM
    You'll have to tell it that
    node:*
    imports are external then
  • j

    jessec

    04/12/2023, 6:07 PM
    That worked
    Copy code
    externals: {
        'node:buffer': 'node:buffer'
      }
  • p

    Ping for toast

    04/12/2023, 6:24 PM
    What's the performance of cloudflare rust workers compared to javascript?
  • j

    James

    04/12/2023, 6:30 PM
    There will always be some performance hit for running wasm vs just running javascript. But for most applications, it should be negligible these days
  • r

    Ryder Cragie

    04/12/2023, 6:33 PM
    What's the difference between Workers Custom Domains and Workers Routes?
  • j

    James

    04/12/2023, 6:34 PM
    Good question. Custom Domains are designed to manage the DNS, certs. etc for you, whereas with Routes, you have to configure the DNS yourself. https://developers.cloudflare.com/workers/platform/triggers/custom-domains/
1...238623872388...2509Latest