I'm trying to ship a lib that uses typescript module augmentation with Parceljs but it doesn't seem to bundle those module augmentations. I'm not able to use the properties in the project that import the lib generated with Parcel.
{
"name": "my-library",
"version": "1.0.0",
"source": "src/index.js",
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"devDependencies": {
"parcel": "latest"
}
}
Example that I try to ship with Parcel and Typescript augmentation.
import { Components, createTheme, PaletteOptions } from '@mui/material/styles';
declare module '@mui/material/styles' {
interface Palette {
ternary: Palette['primary'];
quaternary: Palette['primary'];
gridColor: string;
logoColor: string;
}
interface PaletteOptions {
ternary?: PaletteOptions['primary'];
quaternary?: PaletteOptions['primary'];
gridColor?: string;
logoColor?: string;
}
}
export const defaultTheme = createTheme();
My exported defaultTheme that comes from the lib built with Parcel won't be shipped with additional properties that I defined here. I would like them to be available.