by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    George Payne
    @George-Payne
    Okay, sure, its not entirely out of my hands,
    but to rephase my question,
    Frank Lemanschik
    @frank-dspeed
    i make a long story short i have no answer for you at present sorry
    but i will look into that over the next month
    George Payne
    @George-Payne
    Okay, thank you for your time
    George Payne
    @George-Payne
    Actually, turns out my issue wasn't what I thought it was, the plugin wasn't picking up the files as commonjs modules.
    Adding include: ['./src/protos/*.js'] fixed it.
    Frank Lemanschik
    @frank-dspeed
    cool that i could help
    :D
    Sagnik Pradhan
    @SagnikPradhan
    image.png
    Weird, the error appeared again. Realised I was using prod build for react-dom hence minified errors. After swapping the lib this is what is shows
    Frank Lemanschik
    @frank-dspeed
    you should wait some month i think
    there is nothing you can do now in the next time
    you will only waist your time
    simply include react the real bundle of it
    directly via script tag inside html
    and your done
    Sagnik Pradhan
    @SagnikPradhan
    Hmmmmm
    Frank Lemanschik
    @frank-dspeed
    i have a single good idea
    you could pay a indian to solve that
    go to freelancer.com and then post a project there and offer 35 dollar
    Sagnik Pradhan
    @SagnikPradhan
    Uh
    Frank Lemanschik
    @frank-dspeed
    he will try till he got it working
    Ba Ba K
    @cyclops24

    Hi guys, Anyone here? I have one issue with rollup.
    I used scss and tsx in typescript based project. My folder structure now is something like this:

    src/component_1/index.tsx
    src/component_1/index.scss

    Then in index.tsx I have this line of code:

    import './index.scss'   ==> I expect to change this import to index.css and keep in the final bundle

    After bundling with rollup this file compiled as a CSS file like index.css but the import line was removed from tsx file so my component styles are broked and I need to import my component styles again directly in my web project (where I want to use this component) like this:

    import { Button } from "component-library/build/Button"
    import "component-library/build/Button/index.css"  ===>>> My components styles break without this line

    Have you any suggestion to prevent this import removal through bundling?

    Ba Ba K
    @cyclops24
    @frank-dspeed Any idea about this?
    Frank Lemanschik
    @frank-dspeed
    a lot of ideas
    but no time to go deep into them
    the fastest solution is to simply handle them as external
    so they stay in the files and then you create them with some other software
    Ba Ba K
    @cyclops24
    Thanks @frank-dspeed I'll check it.
    Frank Lemanschik
    @frank-dspeed
    marking them as external inside rollup simply ignores them that is the right thing to do
    Ba Ba K
    @cyclops24

    Thanks I'll check it now. Now I have another issue with rollup-plugin-typescript2 plugin. I have some single line files like this:
    index.ts:

    export { MyComponent } from '../ParentComponentDir'

    It's just export some plugin (just a single line file with a export code)
    I expect to convert this to exact same but with js extension after my build process. But It's completly removed from my build folder. (It's omitted by rollup or rollup-plugin-typescript2)

    this file just prepares some alias from simplifying import in the host app.
    One approach is that copy the missed files after the build process to build folder and rename the extension from ts to js but I want to know why these files omitted from rollup.
    Frank Lemanschik
    @frank-dspeed
    i would say it is removed by typescript
    but i am not sure that is a complex scenario as always
    without knowing and following every possible way
    we can not say anything and it is not so importent it will improve over time
    Christian
    @christiantjl

    @frank-dspeed Controversial take. Every time I see a PR for a project that says "updated to Typescript," I cry inside. Just making more work for everyone by updating code to depend on Microsoft's compiler.

    I'd honestly use it if they didn't do the identifier: type thing, it's unreadable.

    octocodile
    @octocodile
    hi guys, quick question, can multiple input share a same plugins reference ?
    octocodile
    @octocodile
    for example:
    const plugins = [...];
    export default [
      {
        input: 'src/main/index.ts',
        output: {... },
        plugins,
      },
      {
        input: 'src/main/preload.ts',
        output: {...},
        plugins,
      },
    ];
    this works fine for me but Rich recommended against it: https://github.com/rollup/rollup/issues/703#issuecomment-306246339
    Ba Ba K
    @cyclops24
    guys, I don't have any idea how official package in rollup manages. Can someone describe me?
    @frank-dspeed The bad news. The simple fix of a colon character on Windows OS in multi-entry plugin converted to a big refactor and it's breaks anything in preserveModule: true mode. And this buggy PR released today: rollup/plugins#520
    Ba Ba K
    @cyclops24
    The way the Rollup choose to face bugs and communicate made me doubt whether Rollup can be reliable in the production or not.
    Sunil Jhamnani
    @sunil-jhamnani

    I am creating a new package and this is what my dist directory looks like

    dist
        components
             AddressCard.d.ts
             AddressCard.esm.js
             AlignCenter.d.ts
             AlignCenter.esm.js
       index.cjs.js
       index.d.ts
       index.esm.js

    package.json snippet

    {
      "main": "dist/index.cjs.js",
      "module": "dist/index.esm.js",
      "types": "dist/index.d.ts",
      "files": [
        "dist",
        "dist/**/*"
      ],
    }

    I need to enable the submodule tree shaking here. Like import AlignCenter from "module/AlignCenter". I tried all of these

    `import AlignCenter from "module/dist/AlignCenter"`
    `import AlignCenter from "module/dist/components/AlignCenter"`

    but its not working. Can anyone help me here?

    Ba Ba K
    @cyclops24
    It's because you need a index.js file inside your folders.
    @sunil-jhamnani
    Frank Lemanschik
    @frank-dspeed
    @cyclops24 it is not for your production
    you should switch to webpack
    rollup is only for fun webpack is for the professionals