Update esbuild
This commit is contained in:
parent
ca75190e0b
commit
f6debc151c
|
@ -12,7 +12,13 @@ const bs = browserSync.create()
|
|||
const production = process.env.NODE_ENV == 'production'
|
||||
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) => {
|
||||
acc[`process.env.${key}`] = process.env[key] ? `"${process.env[key]}"` : null
|
||||
|
@ -31,7 +37,6 @@ const esbuildOptions = {
|
|||
format: 'esm',
|
||||
bundle: true,
|
||||
platform: 'browser',
|
||||
target: ['chrome58', 'firefox57', 'safari11', 'edge16'],
|
||||
splitting: true,
|
||||
minify: production,
|
||||
sourcemap: !production,
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"connect-history-api-fallback": "^1.6.0",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"esbuild": "^0.8.52",
|
||||
"esbuild": "^0.11.20",
|
||||
"esbuild-plugin-babel": "^0.2.3",
|
||||
"eslint": "^7.26.0",
|
||||
"eslint-plugin-jest": "^24.3.6",
|
||||
|
@ -5316,9 +5316,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.8.52",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.52.tgz",
|
||||
"integrity": "sha512-b5KzFweLLXoXQwdC/e2+Z80c8uo2M5MgP7yQEEebkFw6In4T9CvYcNoM2ElvJt8ByO04zAZUV0fZkXmXoi2s9A==",
|
||||
"version": "0.11.20",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.20.tgz",
|
||||
"integrity": "sha512-QOZrVpN/Yz74xfat0H6euSgn3RnwLevY1mJTEXneukz1ln9qB+ieaerRMzSeETpz/UJWsBMzRVR/andBht5WKw==",
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
|
@ -18543,9 +18543,9 @@
|
|||
}
|
||||
},
|
||||
"esbuild": {
|
||||
"version": "0.8.52",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.52.tgz",
|
||||
"integrity": "sha512-b5KzFweLLXoXQwdC/e2+Z80c8uo2M5MgP7yQEEebkFw6In4T9CvYcNoM2ElvJt8ByO04zAZUV0fZkXmXoi2s9A=="
|
||||
"version": "0.11.20",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.20.tgz",
|
||||
"integrity": "sha512-QOZrVpN/Yz74xfat0H6euSgn3RnwLevY1mJTEXneukz1ln9qB+ieaerRMzSeETpz/UJWsBMzRVR/andBht5WKw=="
|
||||
},
|
||||
"esbuild-plugin-babel": {
|
||||
"version": "0.2.3",
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"connect-history-api-fallback": "^1.6.0",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"esbuild": "^0.8.52",
|
||||
"esbuild": "^0.11.20",
|
||||
"esbuild-plugin-babel": "^0.2.3",
|
||||
"eslint": "^7.26.0",
|
||||
"eslint-plugin-jest": "^24.3.6",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="stylesheet" href="/src/index.css" />
|
||||
<link rel="stylesheet" href="/index.css" />
|
||||
|
||||
<!-- Apple touch devices -->
|
||||
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" />
|
||||
|
@ -14,6 +14,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/index.js"></script>
|
||||
<script type="module" src="/index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue