bili.config.ts
This file
Path
bili.config.ts
29 lines · 639 bytes · TypeScript
Last changed by
fix(build): publish source filesAlec Larsonbefore adoptionfb92884
History of this fileTake it
chore: replace rollup with bili (#306)EGOISTbefore adoptionb9f0029
lines 1–9why, one step back1import {Config} from "bili"23const config: Config = {4 input: {5 immer: "src/index.js"6 },7 output: {8 format: ["cjs", "umd", "esm"],9 moduleName: "immer",fix(build): publish source filesAlec Larsonbefore adoptionfb92884
lines 10–11why, one step back10 sourceMap: true,11 sourceMapExcludeSources: truechore: replace rollup with bili (#306)EGOISTbefore adoptionb9f0029
lines 12–21why, one step back12 },13 babel: {14 // Replace babel-preset-env with buble15 minimal: true,16 babelrc: false17 },18 extendConfig(config, {format}) {19 if (format === "umd") {20 config.output.minify = true21 }fix(build): use .module.js instead of .mjs for esm bundle (#332)EGOISTbefore adoption8b33b98
lines 22–24why, one step back22 if (format === "esm") {23 config.output.fileName = "[name].module.js"24 }chore: replace rollup with bili (#306)EGOISTbefore adoptionb9f0029
lines 25–29why, one step back25 return config26 }27}2829export default config