mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37: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": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./js",
|
"baseUrl": "./js",
|
||||||
"target": "ES2020",
|
"target": "ES2016",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": [
|
"lib": [
|
||||||
"ES2020",
|
"ES2016",
|
||||||
"DOM",
|
"DOM",
|
||||||
"DOM.Iterable"
|
"DOM.Iterable"
|
||||||
],
|
],
|
||||||
|
"moduleResolution": "bundler",
|
||||||
"moduleResolution": "Node",
|
|
||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
|
|
||||||
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
||||||
"types": ["vitest/globals"]
|
"types": ["vitest/globals"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,17 +7,6 @@ import { defineConfig, UserConfig, ConfigEnv } from 'vite';
|
||||||
export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
const isDev = command !== 'build' && mode !== 'test';
|
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 =
|
const themeNames =
|
||||||
fs.readdirSync(path.resolve(__dirname, 'css/themes/')).map(name => {
|
fs.readdirSync(path.resolve(__dirname, 'css/themes/')).map(name => {
|
||||||
const m = name.match(/([-a-z]+).scss/);
|
const m = name.match(/([-a-z]+).scss/);
|
||||||
|
@ -42,7 +31,7 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
target: 'es2020',
|
target: ['es2016', 'chrome67', 'firefox62', 'edge18', 'safari12'],
|
||||||
outDir: path.resolve(__dirname, '../priv/static'),
|
outDir: path.resolve(__dirname, '../priv/static'),
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
sourcemap: isDev,
|
sourcemap: isDev,
|
||||||
|
|
Loading…
Reference in a new issue