Skip to content

Commit

Permalink
Fix Vite warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Nov 17, 2023
1 parent 725df0f commit 4e35f7d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"homepage": "https://github.com/owncloud/web",
"license": "AGPL-3.0",
"author": "ownCloud GmbH <[email protected]>",
"type": "module",
"scripts": {
"build": "vue-demi-fix && pnpm build:tokens && pnpm vite build",
"build:w": "pnpm build --watch",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/config/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Config } from 'jest'
import path from 'path'
import { compilerOptions } from '../../../vite.config'
import { compilerOptions } from '../../../vite.config.common'
const rootDir = path.resolve(__dirname, '../../../')

// We need to transpile these modules as they are using esm syntax
Expand Down
7 changes: 7 additions & 0 deletions vite.config.common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// this file contains settings shared with jest

import { CompilerOptions } from '@vue/compiler-sfc'

export const compilerOptions: CompilerOptions = {
whitespace: 'preserve'
}
8 changes: 2 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ import { existsSync, readdirSync, readFileSync } from 'fs'

// build config
import packageJson from './package.json'
import { compilerOptions } from './vite.config.common'
import { getUserAgentRegExp } from 'browserslist-useragent-regexp'
import browserslistToEsbuild from 'browserslist-to-esbuild'
import { CompilerOptions } from '@vue/compiler-sfc'
import fetch from 'node-fetch'
import { Agent } from 'https'

// ignoredPackages specifies which packages should be explicitly ignored and thus not be transpiled
const ignoredPackages = ['web-app-skeleton']

export const compilerOptions: CompilerOptions = {
whitespace: 'preserve'
}

const buildConfig = {
requirejs: {},
cdn: process.env.CDN === 'true',
Expand Down Expand Up @@ -97,7 +93,7 @@ export const historyModePlugins = () =>
{
name: 'base-href',
transformIndexHtml: {
transform() {
handler() {
return [
{
injectTo: 'head-prepend',
Expand Down

0 comments on commit 4e35f7d

Please sign in to comment.