What was the reasoning behind throwing an error in queries/index.ts and components/index.ts?
|
throw new Error( |
|
`Do not import from roamjs-components/queries directly. Instead import the *query* you need directly. For example: |
|
|
|
import getTextByBlockUid from "roamjs-components/queries/getTextByBlockUid;"` |
|
); |
vs
|
export * from "./constants"; |
|
export { default as addBlockCommand } from "./addBlockCommand"; |
|
export { default as addOldRoamJSDependency } from "./addOldRoamJSDependency"; |
|
export { default as addRoamJSDependency } from "./addRoamJSDependency"; |
|
export { default as addScriptAsDependency } from "./addScriptAsDependency"; |
|
export { default as parseNlpDate } from "./parseNlpDate"; |
|
export { default as parseRoamDateUid } from "./parseRoamDateUid"; |
|
export * from "./constants"; |
Bundle size? or something else?
Going forward, should the following be kept up to date with the default exports?
dom/index.ts
date/index.ts
util/index.ts
writes/index.ts
While queries/index.ts and components/index.ts remain as granular imports?
What was the reasoning behind throwing an error in queries/index.ts and components/index.ts?
roamjs-components/src/queries/index.ts
Lines 1 to 5 in a6cbd49
vs
roamjs-components/src/dom/index.ts
Lines 1 to 5 in a6cbd49
roamjs-components/src/date/index.ts
Lines 1 to 3 in a6cbd49
Bundle size? or something else?
Going forward, should the following be kept up to date with the default exports?
dom/index.ts
date/index.ts
util/index.ts
writes/index.ts
While queries/index.ts and components/index.ts remain as granular imports?