Skip to content

PIE Shared Configuration

personal edited this page Jul 3, 2024 · 6 revisions

Overview

We publish a number of shared configuration files as part of the @justeattakeaway/pie-components-config package. These configurations can be useful so that your components follow as same conventions as the Core PIE Component Library and help to standardise configuration.

Dependencies

If you wish to use our shared configuration, this can be extended by adding the required dependencies:

yarn add -D @justeattakeaway/pie-components-config

tsconfig.json

Modifying your existing tsconfig.json:

{
  "extends": "@justeattakeaway/pie-components-config/tsconfig.json"
  ...
}

TypeScript Path Aliases

The shared configuration is loaded first, then overridden by packages inheriting the base tsconfig file. All relative paths found in the configuration file will be resolved relative to the configuration file from the @justeattakeaway/pie-components-config package. Because of this, we don't define any aliases in the shared configuration.

If you wish to utilise path aliases in your configuration, you should be sure to only add these in consuming applications, and not published packages that utilise Core PIE components

You can find more information about this in the TypeScript documentation..

vite.config.js

We also provide a shared Vite configuration. You can extend this configuration by modifying your existing configuration:

import viteConfig from '@justeattakeaway/pie-components-config/vite.config';

export default viteConfig;