Refactor query message toast
This commit is contained in:
@@ -5,14 +5,34 @@ import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
// @ts-expect-error vite-plugin-eslint has no types
|
||||
import eslint from 'vite-plugin-eslint';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
reactRouter(),
|
||||
tsconfigPaths(),
|
||||
eslint({
|
||||
failOnError: false,
|
||||
}),
|
||||
],
|
||||
appType: 'spa',
|
||||
export default defineConfig(({ command }) => {
|
||||
const isBuild = command === 'build';
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
reactRouter(),
|
||||
tsconfigPaths(),
|
||||
eslint({
|
||||
failOnError: false,
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: isBuild
|
||||
? [
|
||||
{
|
||||
// replace unstyled import with styled for SPA build
|
||||
find: 'react-toastify/unstyled',
|
||||
replacement: 'react-toastify',
|
||||
},
|
||||
{
|
||||
// point to the empty CSS file to stub out the import during build, SPA build does not require extra CSS imports
|
||||
find: 'react-toastify/ReactToastify.css',
|
||||
replacement: '~/empty-toastify.css',
|
||||
},
|
||||
]
|
||||
: [],
|
||||
},
|
||||
appType: 'spa',
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user