Skip to content

Commit

Permalink
Add error handler option for persist/rehydrate.
Browse files Browse the repository at this point in the history
  • Loading branch information
zewish committed Jan 7, 2024
1 parent 79cb906 commit 24a7706
Show file tree
Hide file tree
Showing 21 changed files with 806 additions and 595 deletions.
16 changes: 9 additions & 7 deletions .babelrc.mjs → .babelrc.cts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
import { Options } from '@babel/preset-env';
import { TransformOptions } from '@babel/core';

const browsers = [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9'
'Firefox ESR'
];

const getPresets = ({
modules,
targets = { browsers }
} = {}) => [
}: Partial<Options> = {}) => [
require.resolve('@babel/preset-typescript'),
[require.resolve('@babel/preset-env'), {
modules,
targets,
loose: true,
exclude: ['@babel/plugin-transform-regenerator']
}]
];

export default {
const config: TransformOptions = {
plugins: [
[require.resolve('@babel/plugin-proposal-object-rest-spread'), {
useBuiltIns: true
Expand Down Expand Up @@ -50,4 +50,6 @@ export default {
})
}
}
}
};

export default config;
7 changes: 3 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"demo-web/**",
"dist/**",
"lib/**",
"es/**",
"babel-build.mjs",
"rollup.config.ts"
"es/**"
],
"rules": {
"comma-dangle": 0,
Expand All @@ -42,6 +40,7 @@
"no-new-wrappers": 0,
"guard-for-in": 0,
"wrap-iife": 0,
"no-empty": 0
"no-empty": 0,
"max-classes-per-file": 0
}
}
5 changes: 2 additions & 3 deletions demo-web/.babelrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ export default {
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9'
'Firefox ESR'
]
}
}]
]
}
};
Loading

0 comments on commit 24a7706

Please sign in to comment.