Skip to content

Commit

Permalink
feat: support browsers that are 1 year old
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Dec 19, 2022
1 parent f707192 commit 9d6ea3c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vite:oc10": "OCIS=false vite"
},
"browserslist": [
"last 2 versions",
"last 1 year",
"> .2%",
"not dead",
"not Explorer > 0",
Expand Down Expand Up @@ -69,6 +69,7 @@
"autoprefixer": "10.4.13",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "29.3.1",
"browserslist-to-esbuild": "^1.2.0",
"browserslist-useragent-regexp": "^3.0.2",
"commander": "8.3.0",
"core-js": "3.26.1",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { existsSync, readdirSync, readFileSync } from 'fs'
// build config
import packageJson from './package.json'
import { getUserAgentRegExp } from 'browserslist-useragent-regexp'
import browserslistToEsbuild from 'browserslist-to-esbuild'

const buildConfig = {
requirejs: {},
Expand Down Expand Up @@ -108,7 +109,8 @@ export default defineConfig(({ mode, command }) => {
}
}
}
}
},
target: browserslistToEsbuild()
},
server: {
host: 'host.docker.internal',
Expand Down

0 comments on commit 9d6ea3c

Please sign in to comment.