You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typically, reading the package.json version is done dynamically. However, in a packaged build that is installed as a node module, it is unfeasible to read the package.json of the package. Add support for compiling the package.json version to the build
Proposed Solution
The user would add a version.ts file to the source folder. This file would dynamically load the package.json for development. The user would also add an entry to their BundleMap to compile the package.version into the output version of this file
src/version.ts
// IMPORTANT: This file will be overridden at compile time
// to export the current package.json's version as a string,
// since this package.json won't be loaded dynamically by the
// translator server. This code is in place for development
import { getPackageJson } from 'ts-packager';
export const version = getPackageJson().version;
Typically, reading the package.json version is done dynamically. However, in a packaged build that is installed as a node module, it is unfeasible to read the package.json of the package. Add support for compiling the package.json version to the build
Proposed Solution
The user would add a
version.ts
file to the source folder. This file would dynamically load the package.json for development. The user would also add an entry to their BundleMap to compile the package.version into the output version of this filesrc/version.ts
ts-package-config.ts
The text was updated successfully, but these errors were encountered: