HomeToolsAbout a20k

Name

What is it

Setting the name property in package.json will define the label reference

main attribute defines the entrypoint location of the name

// without scope { "name": "package_name", "main": "src/index.ts" } // with scope { "name": "@scope_name/package_name", "main": "src/index.ts" }

Referencing the named package in other code location

import config from 'package_name/config';

If there is a scope attached to the parent directory

import config from '@scope_name/package_name/config';
© VincentVanKoh