I have a Vite+React+Typescript project where I wast trying to follow the instructions on how to install sidebar. It automatically added some styles to my index.css file. Now, the content pretty muc...
I've been writing a hook+component library for React and Firebase, the source of which can be seen here.
It reached to a certain stability. My current goal is to reduce the size as much as possible. I've checked documents and stuff and this is the vite.config.ts that I have:
typescript
import peerDepsExternal from "rollup-plugin-peer-deps-external";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
import { peerDependencies } from "./package.json";
export default defineConfig({
build: {
lib: {
entry: "./src/index.ts", // Specifies the entry point for building the library.
name: "firereact", // Sets the name of the generated library.
fileName: (format) => `index.${format}.js`, // Generates the output file name based on the format.
formats: ["cjs", "es"], // Specifies the output formats (CommonJS and ES modules).
},
rollupOptions: {
external: [...Object.keys(peerDependencie
I've decided to write my first library in Typescript, which is here.
I've got some questions that I don't think is suitable for StackOverflow because it's quite case-specific rather than being generic and I've got a couple of them rather than one.
I'm trying to wrap my head around JS/TS module system for some while. There are some problems with my library:
If a user imports a hook, they have to do import { useDocument } from 'firereact/firestore/useDocument', but it'd be much better if they could do import { useDocument } from 'firereact/firestore'. I've tried many ways but I couldn't export it to firestore/index.ts I guess. What am I doing wrong?
I have realized that consumers can also import test modules and firebase.ts, which are only used for testing and it is not desirable for them to be imported by the consumers. How can I ignore some specific exports while bundling? They are meant to be used internally.
I use React Helmet. I wanted to inject social meta tags in some of the pages. In order to DRY, I wanted to define these social meta tags as a separate component, which looks as below:
I know this is kind of a soft problem and is highly dependent on the context of a project.
For my own projects, I use scrum points to estimate how much effort it will require to reach to a certain point. I measured my throughput and it seems like, with the amount of time left from my daily job, I can complete around 100 points every month.
Recently, this idea is stuck in my head. Every (web/mobile) project requires a certain set of requirements such as:
Authentication and authorization
Performance metrics and logging
Storage
CRUD for each model etc.
Of course, mostly through Firebase.
I was wondering if there's a way, a website or a platform maybe, to define a list of features/stories and get an estimated total points.