Releases: preconstruct/preconstruct
@preconstruct/cli@2.0.6
@preconstruct/cli@2.0.5
Patch Changes
3c30480
#372 Thanks @mitchellhamilton! - SetpreventAssignment
on@rollup/plugin-replace
to stop browser builds failing to build.
@preconstruct/cli@1.2.2
Patch Changes
0b15e3d
Thanks @mitchellhamilton! - SetpreventAssignment
on@rollup/plugin-replace
to stop browser builds failing to build.
@preconstruct/cli@2.0.4
@preconstruct/cli@2.0.3
@preconstruct/cli@2.0.2
Patch Changes
-
1451fc4
Thanks @mitchellhamilton! - Fix UMD builds where files contain typeof window/document and process.env.NODE_ENV -
e3b4196
#358 Thanks @mitchellhamilton! - Improvements to Babel helper generation so that @babel/runtime(and the core-js versions) is automatically used when it is a dependency even without @babel/plugin-transform-runtime including using all of the available helpers in the version of @babel/runtime that is specified as a dependency(without Preconstruct, unless you specify the version of @babel/runtime that you use in @babel/plugin-transform-runtime, Babel helpers that aren't available in the oldest version of @babel/runtime will be inlined rather than imported from @babel/runtime). -
1451fc4
Thanks @mitchellhamilton! - Fix UMD builds where external dependencies contain process.env.NODE_ENV -
93acf0c
Thanks @mitchellhamilton! - Remove an unnecessary parse -
fe57d4c
Thanks @mitchellhamilton! - Improve TypeScript declaration generation performance by only creating a single program per TS project rather than one per package
@preconstruct/cli@2.0.1
Patch Changes
-
4afde4e
Thanks @mitchellhamilton! - AddtypeScriptProxyFileWithImportEqualsRequireAndExportEquals
experimental flag -
c2a9918
Thanks @mitchellhamilton! - Fix entrypoint glob check on Windows
@preconstruct/cli@2.0.0
Major Changes
-
9ac1df4
Thanks @mitchellhamilton! - Change the way entrypoints are configured. Instead of the entrypoints option referring to the entrypoint directories, they new refer to entrypoint source files. They are resolved relative to thesrc
directory of the package. To get the entrypoint directory from a source file, the extension is removed from the path relative to thesrc
directory and if the last part isindex
, theindex
part is removed. For example, an entrypoint ofsomething.js
would create an entrypoint atpkg-name/something
andanother/index.js
would create an entrypoint atpkg-name/another
.preconstruct fix
will also now automatically create the entrypointpackage.json
s because it already knows where the source file is.For example, a package that looks like the following in
@preconstruct/cli@1
package.json
{ "name": "pkg", "main": "dist/pkg.cjs.js", "preconstruct": { "entrypoints": [".", "other"] } }
src/index.js
export const something = true;
src/other.js
export const other = true;
other/package.json
{ "main": "dist/pkg.cjs.js", "preconstruct": { "source": "../src/other.js" } }
Would need the following changes to work in
@preconstruct/cli@2
package.json
{ "name": "pkg", "main": "dist/pkg.cjs.js", "preconstruct": { - "entrypoints": [".", "other"] + "entrypoints": ["index.js", "other.js"] } }
other/package.json
{ "main": "dist/pkg.cjs.js", - "preconstruct": { - "source": "../src/other.js" - } }
-
9ac1df4
Thanks @mitchellhamilton! - Change the way thatprocess.env.NODE_ENV
is replaced in the production CJS bundle to search forprocess.env.NODE_ENV
in the AST and replace it rather than using Terser to replace it and also skip running Terser on the production CJS bundle and instead rely on Rollup's dead code elimination to improve build performance. It's extremely unlikely that this will break anything but this is being made in a major release just in case it does. -
9ac1df4
Thanks @mitchellhamilton! - Change default dist filename strategy to include the scope and entrypoint path. For example, with an entrypoint accessible at@scope/pkg/entrypoint
, the CJS dist filename would bescope-pkg-entrypoint.cjs.js
. If you'd like to use the old dist filenames, you can set"distFilenameStrategy": "unscoped-package-name"
in your root Preconstruct config. -
dd0f041
Thanks @mitchellhamilton! - Use fast-glob directly instead of globby. This shouldn't break anything but because using fast-glob directly instead of globby may have subtly different behaviour, this is being done in a major version.
Patch Changes
-
027e44d
Thanks @mitchellhamilton! - Remove theuseSourceInsteadOfGeneratingTSDeclarations
anduseTSMorphToGenerateTSDeclarations
experimental flags as the TypeScript declaration generator no longer has the issues that these experimental flags tried to solve -
20902dc
Thanks @mitchellhamilton! - Use symlinks instead of CJS re-export files for "module" and "browser" field when usingpreconstruct dev
.
@preconstruct/cli@1.2.1
Patch Changes
-
620e71f
#344 Thanks @mitchellhamilton! - Makepreconstruct fix
automatically create entrypoint package.jsons rather than asking if it should create them with the new entrypoints experimental flag -
620e71f
#344 Thanks @mitchellhamilton! - Renameonly-unscoped-package-name
tounscoped-package-name
in thedistFilenameStrategy
option(which is only enabled when the experimentalnewDistFilenames
flag is enabled)