@baalspots/now
v2.2.0
Published
A custom Frontity builder for deploying to Vercel
Downloads
6
Readme
Frontity Vercel Builder
Deploy your Frontity project to Vercel.
Before deploying
- Include the following settings in your projects
vercel.json
file:
{
"builds": [
{
"src": "package.json",
"use": "@baalspots/now"
}
],
"buildCommand": "node -v && npx frontity build && node -v",
"devCommand": "npx frontity dev",
"framework": null,
"installCommand": "npm i",
"outputDirectory": "build"
}
Update your Frontity projects local dev environment to use Node 16.
Update
package.json
at the root of your project to use the following Node engine and scripts:
"engines": {
"node": "16.x"
},
"scripts": {
"dev": "npx frontity dev",
"build": "node -v && npx frontity build && node -v",
"serve": "npx frontity serve"
},
Remove all
package-lock.json
files andnode-modules
folders in your Frontity project.Remove
package-lock.json
from your projects.gitignore
fileRun
npm i
at the root of your project.
Hotfix for @loadable/component default export error
This is a temporary fix for the @loadable/component bug reported on Dec 19. Once this issue is resolved by the maintainers at @loadable/component, the following code snippets should be removed.
- Add the following dependency to your projects root
package.json
file:
"@loadable/component": "5.15.3",
- Add the following override settings to the end of your projects root
package.json
file:
"overrides": {
"@loadable/component": "5.15.3"
}
- Remove all
package-lock.json
files andnode-modules
folders in your Frontity project. - Run
npm i
at the root of your project.
Example package.json file
{
"name": "frontity-project",
"description": "Frontity project",
"engines": {
"node": "16.x"
},
"scripts": {
"dev": "npx frontity dev",
"build": "node -v && npx frontity build && node -v",
"serve": "npx frontity serve"
},
"dependencies": {
"@loadable/component": "5.15.3",
...
},
"devDependencies": {
...
},
"overrides": {
"@loadable/component": "5.15.3"
}
}