Releases: preconstruct/preconstruct
@preconstruct/cli@2.1.4
Patch Changes
7c730bd
#415 Thanks @mitchellhamilton! - Fixed generating TypeScript declarations when a JSON file is imported from a TypeScript file.
@preconstruct/cli@2.1.3
@preconstruct/cli@2.1.2
Patch Changes
-
ce31841
#411 Thanks @mitchellhamilton! - Fixed generating declaration maps with versions of TypeScript 4.3 and above.Errors are now also emitted when TypeScript fails to generate declarations because it needs to reference a type that isn't exported. Previously Preconstruct silently generated a broken declaration file when encountering inputs like the one shown below where TypeScript needs to be able to name the type
X
when generating thed.ts
file forindex.ts
but it isn't exported, now it will emit an error instead. To fix the error, you need to export the type.// @filename: index.ts import { getX } from "./x"; export const x = getX(); // @filename: x.ts type X = { x?: X; }; export const getX = (): X => ({});
Note that Preconstruct still does not run TypeScript's type checking, you should still do that in addition to running Preconstruct, Preconstruct will only emit these specific errors.
@preconstruct/cli@2.1.1
Patch Changes
adcca78
Thanks @mitchellhamilton! - Fixed issues aroundERR_PACKAGE_PATH_NOT_EXPORTED
errors when resolving the location of dependencies' package.jsons with UMD builds
@preconstruct/cli@2.1.0
Minor Changes
f798f04
#393 Thanks @with-heart! - Added support for thetsconfig.declarationMap
option.preconstruct
now outputs bothd.ts
andd.ts.map
files todist/declarations/src
when the option is enabled.
@preconstruct/next@3.0.0
Major Changes
41e0210
Thanks @mitchellhamilton! - To use this package, you now need to use a version of Next.js of 10.0.6 or greater. If you would like to use an older version of Next.js, please keep using an older version of this package. Using thefuture.webpack5
Next.js config option is now also supported.
@preconstruct/next@2.0.2
Patch Changes
559cb00
#388 Thanks @VadimZhiltsov! - Add "hook-loader.js" to package files list so it exists on npm
@preconstruct/next@2.0.1
Patch Changes
71c6af6
Thanks @mitchellhamilton! - Importing dependencies in server-side code will no longer bundle @preconstruct/hook(and therefore Babel) when usingpreconstruct dev
and this package. Note this is specific to Next and is not generally needed because Next changes webpack'smainFields
when bundling for Node to prefer themain
field over webpack's default of prefering themodule
field.
@preconstruct/eslint-plugin-format-js-tag@0.1.0
Minor Changes
2ad9494
Thanks @mitchellhamilton! - Initial release
@preconstruct/cli@2.0.7
Patch Changes
-
eee1b6e
#383 Thanks @mitchellhamilton! - AddkeepDynamicImportAsDynamicImportInCommonJS
experimental flag to allow importing Node ESM-only packages in Preconstruct packages. This can be used to ship a package that can be both imported and required and has a dependency that doesn't have a CommonJS distribution.Note that
import()
is asynchronous so it won't be possible to get access to such ESM-only dependency synchronously.