Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update vite-plugin-node-polyfills #491

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/pages/docs/api/pages.getlang.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Home](./index.md) > [@yext/pages](./pages.md) > [getLang](./pages.getlang.md)

## getLang variable
## getLang() function

Function that takes in a [HeadConfig](./pages.headconfig.md) interface and a props, and returns the lang value that will be set on the HTML tag.

Expand All @@ -14,3 +14,14 @@ getLang: <T extends TemplateRenderProps<any>>(
props: T
) => string;
```

## Parameters

| Parameter | Type | Description |
| ---------- | ------------------------------------------------ | ----------- |
| headConfig | [HeadConfig](./pages.headconfig.md) \| undefined | |
| props | T | |

**Returns:**

string
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [getRelativePrefixToRootFromPath](./pages.getrelativeprefixtorootfrompath.md)

## getRelativePrefixToRootFromPath variable
## getRelativePrefixToRootFromPath() function

Function that takes a path to a generated template and returns the relative path to the root of the site. Will return the empty string if already at the root level.

Expand All @@ -11,3 +11,13 @@ Function that takes a path to a generated template and returns the relative path
```typescript
getRelativePrefixToRootFromPath: (path: string) => string;
```

## Parameters

| Parameter | Type | Description |
| --------- | ------ | ----------- |
| path | string | |

**Returns:**

string
16 changes: 8 additions & 8 deletions packages/pages/docs/api/pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

## pages package

## Functions

| Function | Description |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [getLang(headConfig, props)](./pages.getlang.md) | Function that takes in a [HeadConfig](./pages.headconfig.md) interface and a props, and returns the lang value that will be set on the HTML tag. |
| [getRelativePrefixToRootFromPath(path)](./pages.getrelativeprefixtorootfrompath.md) | Function that takes a path to a generated template and returns the relative path to the root of the site. Will return the empty string if already at the root level. |
| [renderHeadConfigToString(headConfig)](./pages.renderheadconfigtostring.md) | Function that takes a [HeadConfig](./pages.headconfig.md) interface and outputs a valid string of HTML that will be inserted into the generated document between the head tags. |

## Interfaces

| Interface | Description |
Expand All @@ -22,14 +30,6 @@
| [TemplateProps](./pages.templateprops.md) | The shape of the data passed directly to the different template functions with the exception of the render function (getPath, getHeadConfig, etc). |
| [TemplateRenderProps](./pages.templaterenderprops.md) | The shape of the data passed directly to the template's render function. Extends the [TemplateProps](./pages.templateprops.md) interface and has the additions of a path and a relativePrefixToRoot field. |

## Variables

| Variable | Description |
| ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [getLang](./pages.getlang.md) | Function that takes in a [HeadConfig](./pages.headconfig.md) interface and a props, and returns the lang value that will be set on the HTML tag. |
| [getRelativePrefixToRootFromPath](./pages.getrelativeprefixtorootfrompath.md) | Function that takes a path to a generated template and returns the relative path to the root of the site. Will return the empty string if already at the root level. |
| [renderHeadConfigToString](./pages.renderheadconfigtostring.md) | Function that takes a [HeadConfig](./pages.headconfig.md) interface and outputs a valid string of HTML that will be inserted into the generated document between the head tags. |

## Type Aliases

| Type Alias | Description |
Expand Down
12 changes: 11 additions & 1 deletion packages/pages/docs/api/pages.renderheadconfigtostring.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Home](./index.md) &gt; [@yext/pages](./pages.md) &gt; [renderHeadConfigToString](./pages.renderheadconfigtostring.md)

## renderHeadConfigToString variable
## renderHeadConfigToString() function

Function that takes a [HeadConfig](./pages.headconfig.md) interface and outputs a valid string of HTML that will be inserted into the generated document between the head tags.

Expand All @@ -11,3 +11,13 @@ Function that takes a [HeadConfig](./pages.headconfig.md) interface and outputs
```typescript
renderHeadConfigToString: (headConfig: HeadConfig) => string;
```

## Parameters

| Parameter | Type | Description |
| ---------- | ----------------------------------- | ----------- |
| headConfig | [HeadConfig](./pages.headconfig.md) | |

**Returns:**

string
2 changes: 1 addition & 1 deletion packages/pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"rollup": "^4.7.0",
"ts-morph": "^21.0.1",
"typescript": "^5.3.3",
"vite-plugin-node-polyfills": "^0.17.0",
"vite-plugin-node-polyfills": "^0.21.0",
"yaml": "^2.3.4"
},
"devDependencies": {
Expand Down
5 changes: 0 additions & 5 deletions packages/pages/src/vite-plugin/build/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import { ProjectStructure } from "../../common/src/project/structure.js";
import { processEnvVariables } from "../../util/processEnvVariables.js";
import { buildServerlessFunctions } from "../serverless-functions/plugin.js";

const intro = `
var global = globalThis;
`;

/**
* This plugin defines how to build the project for production. It bundles
* assets, copies Yext plugin files that execute the bundled assets in a Deno
Expand Down Expand Up @@ -49,7 +45,6 @@ export const build = async (
rollupOptions: {
preserveEntrySignatures: "strict",
output: {
intro,
assetFileNames: `${subfolders.assets}/${subfolders.static}/[name]-[hash][extname]`,
chunkFileNames: `${subfolders.assets}/${subfolders.static}/[name]-[hash].js`,
sanitizeFileName: false,
Expand Down
Loading
Loading