Skip to content

Releases: preconstruct/preconstruct

@preconstruct/cli@2.1.4

14 Sep 06:57
a241179
Compare
Choose a tag to compare

Patch Changes

@preconstruct/cli@2.1.3

13 Sep 02:50
41860cb
Compare
Choose a tag to compare

Patch Changes

@preconstruct/cli@2.1.2

08 Sep 00:52
9486484
Compare
Choose a tag to compare

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 the d.ts file for index.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

20 Aug 03:38
4b8e443
Compare
Choose a tag to compare

Patch Changes

  • adcca78 Thanks @mitchellhamilton! - Fixed issues around ERR_PACKAGE_PATH_NOT_EXPORTED errors when resolving the location of dependencies' package.jsons with UMD builds

@preconstruct/cli@2.1.0

06 May 23:57
1042f15
Compare
Choose a tag to compare

Minor Changes

  • f798f04 #393 Thanks @with-heart! - Added support for the tsconfig.declarationMap option. preconstruct now outputs both d.ts and d.ts.map files to dist/declarations/src when the option is enabled.

@preconstruct/next@3.0.0

14 Apr 03:55
01634cd
Compare
Choose a tag to compare

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 the future.webpack5 Next.js config option is now also supported.

@preconstruct/next@2.0.2

08 Apr 10:31
50744cf
Compare
Choose a tag to compare

Patch Changes

@preconstruct/next@2.0.1

08 Apr 00:32
07a24f7
Compare
Choose a tag to compare

Patch Changes

  • 71c6af6 Thanks @mitchellhamilton! - Importing dependencies in server-side code will no longer bundle @preconstruct/hook(and therefore Babel) when using preconstruct dev and this package. Note this is specific to Next and is not generally needed because Next changes webpack's mainFields when bundling for Node to prefer the main field over webpack's default of prefering the module field.

@preconstruct/eslint-plugin-format-js-tag@0.1.0

08 Apr 00:32
07a24f7
Compare
Choose a tag to compare

@preconstruct/cli@2.0.7

08 Apr 00:32
07a24f7
Compare
Choose a tag to compare

Patch Changes

  • eee1b6e #383 Thanks @mitchellhamilton! - Add keepDynamicImportAsDynamicImportInCommonJS 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.