@rendela/vite 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +0 -0
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
- package/dist/package.json +0 -56
- package/dist/readme.txt +0 -115
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACjE,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAiB,KAAK;IACtD,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;IACjC,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QACvC,OAAO;IACT,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClB,QAAQ,CA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IACrB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,YAAY;IACtB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,+BAA+B;IACvC,MAAM,EAAE,UAAU;CACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rendela/vite",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A tool for pre-rendering pages of your SPA to improve SEO and performance",
|
|
5
5
|
"author": "llopary",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"vite": "^5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"playwright": "
|
|
58
|
+
"playwright": "1.52.0"
|
|
59
59
|
},
|
|
60
60
|
"keywords": [
|
|
61
61
|
"vite",
|
package/dist/package.json
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rendela",
|
|
3
|
-
"version": "1.1.8",
|
|
4
|
-
"description": "A tool for pre-rendering pages of your SPA to improve SEO and performance",
|
|
5
|
-
"author": "llopary",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"bin": {
|
|
11
|
-
"rendela": "./dist/cli.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist"
|
|
15
|
-
],
|
|
16
|
-
"exports": {
|
|
17
|
-
".": {
|
|
18
|
-
"import": "./dist/index.js",
|
|
19
|
-
"types": "./dist/types/index.d.ts"
|
|
20
|
-
},
|
|
21
|
-
"./config": {
|
|
22
|
-
"import": "./dist/config.js",
|
|
23
|
-
"types": "./dist/types/config.d.ts"
|
|
24
|
-
},
|
|
25
|
-
"./server": {
|
|
26
|
-
"import": "./dist/server.js",
|
|
27
|
-
"types": "./dist/types/server.d.ts"
|
|
28
|
-
},
|
|
29
|
-
"./crawler": {
|
|
30
|
-
"import": "./dist/crawler.js",
|
|
31
|
-
"types": "./dist/types/crawler.d.ts"
|
|
32
|
-
},
|
|
33
|
-
"./logUtils": {
|
|
34
|
-
"import": "./dist/utils/logUtils.js",
|
|
35
|
-
"types": "./dist/types/utils/logUtils.d.ts"
|
|
36
|
-
},
|
|
37
|
-
"./cli": {
|
|
38
|
-
"import": "./dist/cli.js",
|
|
39
|
-
"types": "./dist/types/cli.d.ts"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"build": "tsc",
|
|
44
|
-
"dev": "tsc --watch",
|
|
45
|
-
"prepare": "tsc",
|
|
46
|
-
"pub": "npm run build && npm publish --no-git-checks"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"typescript": "^5.8.2",
|
|
50
|
-
"vite": "^5.0.0"
|
|
51
|
-
},
|
|
52
|
-
"dependencies": {
|
|
53
|
-
"playwright": "^1.52.0",
|
|
54
|
-
"puppeteer": "^24.5.0"
|
|
55
|
-
}
|
|
56
|
-
}
|
package/dist/readme.txt
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
# Rendela - SPA Page Prerendering Plugin
|
|
2
|
-
|
|
3
|
-
`Rendela` is a powerful tool designed to optimize Single Page Applications (SPAs) by prerendering them for better SEO, performance, and overall user experience. It helps search engines to index your pages more effectively, improves load times, and enhances the visibility of your site.
|
|
4
|
-
|
|
5
|
-
## Key Features
|
|
6
|
-
- **SEO Optimization:** Prerenders pages to ensure they are properly indexed by search engines.
|
|
7
|
-
- **Faster Load Times:** By prerendering pages, users get content faster on their first visit.
|
|
8
|
-
- **Easy Integration:** Easily integrates with your existing SPA built with frameworks like Vue, React, etc.
|
|
9
|
-
- **Works with Vite:** This package works seamlessly with Vite to optimize SPA performance.
|
|
10
|
-
|
|
11
|
-
## Prerequisites
|
|
12
|
-
|
|
13
|
-
Before you start using `rendela`, you will need to install **Chromium** on your machine. This is required to properly prerender the pages as `rendela` uses Chromium in headless mode for rendering.
|
|
14
|
-
|
|
15
|
-
### Installation for Chromium
|
|
16
|
-
|
|
17
|
-
#### On Ubuntu/Debian (Linux)
|
|
18
|
-
|
|
19
|
-
1. First, update your package list:
|
|
20
|
-
```bash
|
|
21
|
-
sudo apt update
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
2. Then, install Chromium:
|
|
25
|
-
```bash
|
|
26
|
-
sudo apt install chromium
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
3. Verify the installation by running:
|
|
30
|
-
```bash
|
|
31
|
-
chromium --version
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
This should show the installed Chromium version.
|
|
35
|
-
|
|
36
|
-
#### On Windows
|
|
37
|
-
|
|
38
|
-
1. **Download Chromium**: You can download the latest stable version of Chromium from the [official website](https://download-chromium.appspot.com/).
|
|
39
|
-
|
|
40
|
-
2. **Extract the Archive**: Extract the downloaded `.zip` file to a location of your choice (e.g., `C:\Program Files\Chromium`).
|
|
41
|
-
|
|
42
|
-
3. **Set the Path**: You need to add the path to the Chromium executable in your system’s PATH environment variable.
|
|
43
|
-
- Open **System Properties** > **Environment Variables**.
|
|
44
|
-
- Under **System Variables**, find and select `Path`, then click **Edit**.
|
|
45
|
-
- Click **New**, and add the path to the folder where Chromium is located (e.g., `C:\Program Files\Chromium`).
|
|
46
|
-
|
|
47
|
-
4. Verify the installation by running the following command in a terminal or command prompt:
|
|
48
|
-
```bash
|
|
49
|
-
chromium --version
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
#### On macOS
|
|
53
|
-
|
|
54
|
-
1. **Install Chromium**: You can install Chromium using Homebrew. If you don't have Homebrew installed, first install it by running:
|
|
55
|
-
```bash
|
|
56
|
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
2. **Install Chromium** via Homebrew:
|
|
60
|
-
```bash
|
|
61
|
-
brew install chromium
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
3. Verify the installation by running:
|
|
65
|
-
```bash
|
|
66
|
-
chromium --version
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
If you don't use Homebrew, you can manually download Chromium from the [official website](https://download-chromium.appspot.com/) and follow similar steps as for Windows.
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Installation
|
|
74
|
-
|
|
75
|
-
Once Chromium is installed on your machine, you can proceed to install `rendela` as a Vite plugin.
|
|
76
|
-
|
|
77
|
-
1. Install the package via npm or yarn:
|
|
78
|
-
```bash
|
|
79
|
-
npm install @rendela/vite
|
|
80
|
-
# or
|
|
81
|
-
yarn add @rendela/vite
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
2. Add `rendela` to your `vite.config.js`:
|
|
85
|
-
```javascript
|
|
86
|
-
import { defineConfig } from 'vite'
|
|
87
|
-
import rendela from '@rendela/vite'
|
|
88
|
-
|
|
89
|
-
export default defineConfig({
|
|
90
|
-
plugins: [rendela()],
|
|
91
|
-
})
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Usage
|
|
97
|
-
|
|
98
|
-
Once you've installed and configured `rendela` with Vite, it will automatically handle prerendering of your SPA pages when you build your project.
|
|
99
|
-
|
|
100
|
-
### How It Works
|
|
101
|
-
- `rendela` will use the installed Chromium instance in headless mode to render and capture your pages.
|
|
102
|
-
- It generates static HTML files of your pages that can be served to crawlers or users, ensuring better SEO and performance.
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Additional Notes
|
|
107
|
-
|
|
108
|
-
- Make sure your Chromium installation is accessible from your system's PATH for `rendela` to function properly.
|
|
109
|
-
- If you're running the plugin in a CI environment, make sure the Chromium binary is installed and available.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## License
|
|
114
|
-
|
|
115
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|