0

Does anyone know how to build out a component library with file names like this toggle.component.ts etc... it seems very difficult trying to get the compiler to work with the .component ending.

Structure:

└── 📁src
    └── 📁toggle
        └── index.ts
        └── toggle.component.html
        └── toggle.component.scss
        └── toggle.component.ts
        └── toggle.component.types.ts
    └── index.ts

File: rollup.config.js

  input: {
    index: "src/index.ts", // ✅ Ensures `dist/toggle/index.js`
    toggle: "src/toggle/index.ts",
  },
  output: {
    dir: "dist",
    format: "esm",
    entryFileNames: "[name].js",
  },

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.