npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@floriannoever/bc-controladdin-config-ts

v1.0.1

Published

Shared TypeScript and Rollup configuration for Business Central control add-ins

Readme

BC ControlAddIn Config TS

Shared TypeScript and Rollup configuration for Business Central control add-ins.

Provides:

  • A createRollupConfig factory that produces a ready-to-use Rollup bundle config (IIFE, TypeScript, CSS injection, image inlining, font inlining)
  • A base tsconfig.json tuned for BC control add-in projects
  • Ambient type declarations for CSS, image, and font imports

How to use the package

  1. Install via npm install --save-dev @floriannoever/bc-controladdin-config-ts
  2. Add rollup as a peer dependency if not already present: npm install --save-dev rollup

Setting up the Rollup config

Create a rollup.config.js in the root of your project:

import { readFileSync } from 'node:fs';
import { createRollupConfig } from '@floriannoever/bc-controladdin-config-ts/rollup';

const pkg = JSON.parse(readFileSync('./package.json', 'utf-8'));
export default createRollupConfig(pkg);

createRollupConfig reads the following from your package.json:

  • name — used to derive the output file name (dist/<name>.bundle.js) and the IIFE global variable name (hyphens replaced with underscores). Scoped package names (e.g. @scope/my-addin) have the scope stripped automatically.

The factory always uses src/index.ts as the entry point and writes a single IIFE bundle to dist/. A //# sourceURL footer is appended so DevTools stack traces are clickable.

Included plugins

| Plugin | Effect | | ----------------------------- | ---------------------------------------------------------------------- | | @rollup/plugin-node-resolve | Resolves third-party packages from node_modules (browser conditions) | | @rollup/plugin-commonjs | Converts CommonJS dependencies to ES modules | | @rollup/plugin-typescript | Compiles TypeScript via the project's own tsconfig.json | | rollup-plugin-postcss | Bundles CSS and injects it via a <style> tag at runtime | | @rollup/plugin-image | Inlines SVG and raster images as base64 data URIs | | @rollup/plugin-url | Inlines font files (woff, woff2, eot, ttf, otf) as base64 data URIs |

ESLint directive comments (// eslint-... and /* eslint-... */) are stripped from the final bundle automatically.

Setting up the TypeScript config

Create a tsconfig.json in the root of your project that extends the shared config:

{
    "extends": "@floriannoever/bc-controladdin-config-ts/tsconfig.json",
    "compilerOptions": {
        "types": ["@floriannoever/bc-controladdin-config-ts"]
    },
    "include": ["src"]
}

The "types" entry registers the ambient module declarations from this package, which lets TypeScript resolve imports of .css, .svg, .png, .jpg, .jpeg, .gif, .woff, .woff2, .eot, .ttf, and .otf files without errors.

Base compiler options

The shared tsconfig.json sets the following defaults (all can be overridden in your project):

| Option | Value | | ------------------ | ------------------------------------------------ | | target | esnext | | module | ESNext | | moduleResolution | bundler | | lib | dom, dom.iterable, esnext | | strict | true | | isolatedModules | true | | noEmit | true (type-checking only; Rollup handles emit) |

Recommended scripts

Add these to your package.json:

{
    "scripts": {
        "build": "rollup --config rollup.config.js",
        "type-check": "tsc --noEmit"
    }
}