Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Pat Cavit
    @tivac
    because uh
    that should fail a build :-\
    Chiel Kunkels
    @chiel
    okay well that works - so I was using "sass" syntax (//)
    which caused that unknown word error
    and it does fail the build btw
    Pat Cavit
    @tivac
    But not in a useful way, it seems like
    Chiel Kunkels
    @chiel
    hmm yeah so this is part of a storybook build
    Pat Cavit
    @tivac
    Since ideally it would've screamed at you about that specific file and that specific position
    Chiel Kunkels
    @chiel
    ✖ 「wdm」: TypeError: Cannot read property 'root' of undefined
        at Processor.output (/Users/ckunkels/dev/act-team-js/node_modules/@modular-css/processor/processor.js:267:41)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:94:5)
    this is the error it spits out
    Pat Cavit
    @tivac
    Yeah that's not correct/valuable
    Chiel Kunkels
    @chiel
    so it fails indeed after the actual error
    since the processing fails, you'd ideally want it to fail there I guess
    Pat Cavit
    @tivac
    Yup
    Chiel Kunkels
    @chiel
    might be something in how the error is propagated from the processor to the webpack plugin or so?
    Pat Cavit
    @tivac
    Could be, sec
    well I fucked up all the REPL styling somehow so that's not gonna work.
    Chiel Kunkels
    @chiel
    haha
    well let me know if I can debug something for you :)
    Pat Cavit
    @tivac

    Well I mean it does at least barf out to the console,

    Error parsing "/main.css" CssSyntaxError: "modular-css-scoping: /main.css:2:1: Unexpected '/'. Escaping special characters with \ may help."

    So that's the error webpack should give if the file is invalid, more or less
    Also there's a postcss plugin for // style comments IIRC
    Chiel Kunkels
    @chiel
    ah
    Pat Cavit
    @tivac
    you can add it as a before and you should be ok
    Chiel Kunkels
    @chiel
    hmm, that's a parser though, rather than a plugin, according to the documentation: https://www.npmjs.com/package/postcss-comment
    thanks for the tip!
    ah, but that still needs a compliant parser, which the default one is not :D
    Pat Cavit
    @tivac
    Oh good point, clearly I've never actually tried that
    should probably add support for a parser option to allow customizing that
    sigh
    Chiel Kunkels
    @chiel
    you already do
    tadaaaam
    gonna try right away, I'll let you know how I fare
    Pat Cavit
    @tivac
    lmao well I'm glad you know how this software works
    because clearly I'm just faking it
    Chiel Kunkels
    @chiel
    hahaha
    hey man, I'm a professional documentation reader + stackoverflow copy/paster
    hmm that seems to die, let me see what's up
    Chiel Kunkels
    @chiel
    nope I'm an idiot, that works a charm!
    thanks for the help :)
    Pat Cavit
    @tivac
    ok cool, so the real problem here is the webpack (& maybe others?) build not failing in the correct way when a file can't be processed
    Would you be willing to file a bug on that?
    Chiel Kunkels
    @chiel
    yeah, or when a file is missing
    cause the file was missing just now (installing postcss-scss removed a local symlink in node_modules) and it spat out the same error:
    ✖ 「wdm」: TypeError: Cannot read property 'root' of undefined
        at Processor.output (/Users/ckunkels/dev/act-team-js/node_modules/@modular-css/processor/processor.js:266:41)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:94:5)
    Pat Cavit
    @tivac
    bleh
    Chiel Kunkels
    @chiel
    haha :p
    Chiel Kunkels
    @chiel
    @tivac I've filed an issue, thanks so much for your help!
    keb
    @keb
    hi all! is there a way to prefix the generated classNames so that I can whitelist them from purgeCSS? seems like purgecss doesn't see them in my Preact components since are dynamic, so it's eating them up