Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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
    or is there some convention they follow? from what I've seen they all start with "mc" but can't be sure from my 2 hours of playing around with this
    Pat Cavit
    @tivac
    They're all mc_ by default yes
    You can specify a namer option that is a function if you want to change the naming algorithm
    keb
    @keb
    thanks @tivac !
    Pat Cavit
    @tivac
    👍🏻
    Chiel Kunkels
    @chiel
    @tivac do you have any experience using modular-css with typescript?
    I've managed to generate some typings files using typed-css-modules, but on the command line
    Pat Cavit
    @tivac
    Nope, not even a little bit!
    I view TS as a necessary evil for some folks and otherwise avoid it because it makes me grouchy :)
    Chiel Kunkels
    @chiel
    haha fair enough, that makes sense
    I do like it, but indeed it requires some more effort to get it to work