Closed NickdeK closed 1 year ago
@NickdeK Did you setup your aliases in vite config as well?
@amit-feldman Yes, the same as in the repo: https://github.com/logue/vite-vue2-vuetify-ts-starter/blob/master/vite.config.ts#L22-L28
@amit-feldman I've just noticed there also is another config that has different aliases configured, is this causing the problem perhaps? https://github.com/logue/vite-vue2-vuetify-ts-starter/blob/master/vitest.config.ts#L16-L22
I've tried both alias configurations in both files and neither solves the original issue unfortunately.
@NickdeK hard to tell without seeing your config files 😞
yarn run build
is for checking whether the build passes locally and uploading the product manually.
Since Meta.ts
is not included in the repository by default, an error will occur if you build it in an external environment (such as Github Action, Cloudflare Pages, Vercel, etc.).
Use build:deploy
when building in an automatic deployment environment.
https://github.com/logue/vite-vue2-vuetify-ts-starter#commands
Below is an example configuration for Github Action:
name: Deploy to gh-pages
on:
push:
branches: ['master']
pull_request:
branches: ['master']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout ✅
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }} ⚡
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build 🔧
run: |
yarn install
yarn build:deploy
- name: Deploy to gh-pages 🚀
uses: JamesIves/github-pages-deploy-action@v4.4.0
with:
branch: gh-pages # The branch the action should deploy to.
folder: dist # The folder the action should deploy.
@logue Ahhh you are absolutely right. I thought build:*
where sub command that also ran with build
. Makes sense tho, thanks for the help!
So I've been using this template for a simple hobby project that I wanted to deploy with Vercel, but I get this typescript error that I don't get locally when using the build command.
I'm guessing this has to do with the aliases defined in
tsconfig.ts
but I can't figure out what could be wrong with this.