Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Feb 7, 2024
1 parent 0a0e060 commit d217f5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion playground/spa-file-mode/__tests__/file-mode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { listFiles, readFile } from '~utils'
import glob from 'fast-glob'
import fs from 'fs-extra'
import path from 'node:path'
import { normalizePath } from 'vite'
import { beforeAll, describe, expect, test } from 'vitest'

const manifestPath = 'node_modules/.vite-plugin-public-typescript/manifest.json'

const out = path.resolve(__dirname, '../public/out')
const out = normalizePath(path.resolve(__dirname, '../public/out'))

describe('file-mode', () => {
let jsFiles: string[]
Expand All @@ -29,6 +30,8 @@ describe('file-mode', () => {
test('should babel transform', async () => {
const babel = (await glob(`${out}/babel.?(*.)js`, { absolute: true }))[0]

console.log(babel, 'babel')

expect(fs.readFileSync(babel, 'utf8')).toContain('@babel/helpers - typeof')
})
})
1 change: 0 additions & 1 deletion playground/spa-file-mode/public/out/env.16b274f5.js

This file was deleted.

1 change: 1 addition & 0 deletions playground/spa-file-mode/public/out/env.9aa2ccba.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(function(){var e={VITE_ENV_FROM_ENVFILE:"imfromdotenv",BASE_URL:"/vite-plugin-public-typescript/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};window.VITE_ENV=e;})();

0 comments on commit d217f5b

Please sign in to comment.