1
Fork 0

Update esbuild

This commit is contained in:
viktorstrate 2021-05-12 14:34:03 +02:00
parent ca75190e0b
commit f6debc151c
No known key found for this signature in database
GPG Key ID: 3F855605109C1E8A
4 changed files with 17 additions and 12 deletions

View File

@ -12,7 +12,13 @@ const bs = browserSync.create()
const production = process.env.NODE_ENV == 'production' const production = process.env.NODE_ENV == 'production'
const watchMode = process.argv[2] == 'watch' const watchMode = process.argv[2] == 'watch'
const ENVIRONMENT_VARIABLES = ['NODE_ENV', 'PHOTOVIEW_API_ENDPOINT', 'VERSION', 'BUILD_DATE', 'COMMIT_SHA'] const ENVIRONMENT_VARIABLES = [
'NODE_ENV',
'PHOTOVIEW_API_ENDPOINT',
'VERSION',
'BUILD_DATE',
'COMMIT_SHA',
]
const defineEnv = ENVIRONMENT_VARIABLES.reduce((acc, key) => { const defineEnv = ENVIRONMENT_VARIABLES.reduce((acc, key) => {
acc[`process.env.${key}`] = process.env[key] ? `"${process.env[key]}"` : null acc[`process.env.${key}`] = process.env[key] ? `"${process.env[key]}"` : null
@ -31,7 +37,6 @@ const esbuildOptions = {
format: 'esm', format: 'esm',
bundle: true, bundle: true,
platform: 'browser', platform: 'browser',
target: ['chrome58', 'firefox57', 'safari11', 'edge16'],
splitting: true, splitting: true,
minify: production, minify: production,
sourcemap: !production, sourcemap: !production,

14
ui/package-lock.json generated
View File

@ -23,7 +23,7 @@
"connect-history-api-fallback": "^1.6.0", "connect-history-api-fallback": "^1.6.0",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"esbuild": "^0.8.52", "esbuild": "^0.11.20",
"esbuild-plugin-babel": "^0.2.3", "esbuild-plugin-babel": "^0.2.3",
"eslint": "^7.26.0", "eslint": "^7.26.0",
"eslint-plugin-jest": "^24.3.6", "eslint-plugin-jest": "^24.3.6",
@ -5316,9 +5316,9 @@
} }
}, },
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.8.52", "version": "0.11.20",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.52.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.20.tgz",
"integrity": "sha512-b5KzFweLLXoXQwdC/e2+Z80c8uo2M5MgP7yQEEebkFw6In4T9CvYcNoM2ElvJt8ByO04zAZUV0fZkXmXoi2s9A==", "integrity": "sha512-QOZrVpN/Yz74xfat0H6euSgn3RnwLevY1mJTEXneukz1ln9qB+ieaerRMzSeETpz/UJWsBMzRVR/andBht5WKw==",
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
"esbuild": "bin/esbuild" "esbuild": "bin/esbuild"
@ -18543,9 +18543,9 @@
} }
}, },
"esbuild": { "esbuild": {
"version": "0.8.52", "version": "0.11.20",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.52.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.20.tgz",
"integrity": "sha512-b5KzFweLLXoXQwdC/e2+Z80c8uo2M5MgP7yQEEebkFw6In4T9CvYcNoM2ElvJt8ByO04zAZUV0fZkXmXoi2s9A==" "integrity": "sha512-QOZrVpN/Yz74xfat0H6euSgn3RnwLevY1mJTEXneukz1ln9qB+ieaerRMzSeETpz/UJWsBMzRVR/andBht5WKw=="
}, },
"esbuild-plugin-babel": { "esbuild-plugin-babel": {
"version": "0.2.3", "version": "0.2.3",

View File

@ -23,7 +23,7 @@
"connect-history-api-fallback": "^1.6.0", "connect-history-api-fallback": "^1.6.0",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"esbuild": "^0.8.52", "esbuild": "^0.11.20",
"esbuild-plugin-babel": "^0.2.3", "esbuild-plugin-babel": "^0.2.3",
"eslint": "^7.26.0", "eslint": "^7.26.0",
"eslint-plugin-jest": "^24.3.6", "eslint-plugin-jest": "^24.3.6",

View File

@ -4,7 +4,7 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />
<link rel="stylesheet" href="/src/index.css" /> <link rel="stylesheet" href="/index.css" />
<!-- Apple touch devices --> <!-- Apple touch devices -->
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" /> <link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" />
@ -14,6 +14,6 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script type="module" src="/src/index.js"></script> <script type="module" src="/index.js"></script>
</body> </body>
</html> </html>