mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 14:17:59 +01:00
polyfill js for older browsers i guess
This commit is contained in:
parent
377317a26b
commit
6cf90203cb
2 changed files with 4 additions and 19 deletions
|
@ -1,26 +1,22 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./js",
|
||||
"target": "ES2020",
|
||||
"target": "ES2016",
|
||||
"useDefineForClassFields": true,
|
||||
"esModuleInterop": true,
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"ES2016",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
|
||||
"moduleResolution": "Node",
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
|
||||
|
||||
"strict": true,
|
||||
|
||||
"types": ["vitest/globals"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,17 +7,6 @@ import { defineConfig, UserConfig, ConfigEnv } from 'vite';
|
|||
export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
||||
const isDev = command !== 'build' && mode !== 'test';
|
||||
|
||||
if (isDev) {
|
||||
// Terminate the watcher when Phoenix quits
|
||||
// @see https://moroz.dev/blog/integrating-vite-js-with-phoenix-1-6
|
||||
process.stdin.on('close', () => {
|
||||
// eslint-disable-next-line no-process-exit
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.stdin.resume();
|
||||
}
|
||||
|
||||
const themeNames =
|
||||
fs.readdirSync(path.resolve(__dirname, 'css/themes/')).map(name => {
|
||||
const m = name.match(/([-a-z]+).scss/);
|
||||
|
@ -42,7 +31,7 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
|||
}
|
||||
},
|
||||
build: {
|
||||
target: 'es2020',
|
||||
target: ['es2016', 'chrome67', 'firefox62', 'edge18', 'safari12'],
|
||||
outDir: path.resolve(__dirname, '../priv/static'),
|
||||
emptyOutDir: false,
|
||||
sourcemap: isDev,
|
||||
|
|
Loading…
Reference in a new issue