Code Monkey home page Code Monkey logo

Comments (5)

apstone avatar apstone commented on May 20, 2024 3

@apstone should be fixed in 8.3.0. Give it a try!

Looks to be working again for me. Thanks again @DuCanhGH

from serwist.

DuCanhGH avatar DuCanhGH commented on May 20, 2024 1

Bloody hell.
Supporting both ESM and CJS is just so much hassle I'm not going to lie.
This was due to a change in our rollup.config.js:
Old:

[
  {
    input: "src/index.ts",
    output: [
      {
        file: "dist/index.old.cjs",
        format: "cjs",
        exports: "named",
      },
      {
        file: "dist/index.js",
        format: "esm",
      },
    ],
  },
  {
    input: "src/index.internal.ts",
    output: [
      {
        file: "dist/index.internal.old.cjs",
        format: "cjs",
        exports: "named",
      },
      {
        file: "dist/index.internal.js",
        format: "esm",
      },
    ],
  },
];

New:

{
  input: {
    index: "src/index.ts",
    "index.internal": "src/index.internal.ts",
  },
  output: [
    {
      dir: "dist",
      entryFileNames: "[name].cjs",
      format: "cjs",
      exports: "named",
    },
    {
      dir: "dist",
      entryFileNames: "[name].js",
      format: "esm",
    },
  ],
}

Turns out I also need chunkFileNames, otherwise Rollup would always use ".js" for all the chunks. What in the world.

from serwist.

DuCanhGH avatar DuCanhGH commented on May 20, 2024 1

@apstone should be fixed in 8.3.0. Give it a try!

from serwist.

apstone avatar apstone commented on May 20, 2024

Happy to help if you will point me in the right direction!

from serwist.

apstone avatar apstone commented on May 20, 2024

Ahh - makes sense. I am not that familiar with this process, but appreciate your effort @DuCanhGH

from serwist.

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.