Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundlewatch.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"files": [
{
"path": "dist/mirador.min.js",
"maxSize": "700 KB"
"maxSize": "710 kB"
}
]
}
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default [
'import/no-duplicates': 'error',
'import/no-extraneous-dependencies': 'off',
'import/no-mutable-exports': 'error',
'import/no-unresolved': [2, { ignore: ['test-utils', '@vitejs/plugin-react'] }],
'import/no-unresolved': [2, { ignore: ['test-utils', '@vitejs/plugin-react', 'vite'] }],
'import/prefer-default-export': 'off',
'max-depth': ['warn', 4],
'max-params': ['warn', 5],
Expand Down
6 changes: 3 additions & 3 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
publish = "dist/"

[context.main.environment]
NODE_VERSION = "20.18.1"
NODE_VERSION = "22.12.0"

[context.deploy-preview.environment]
NODE_VERSION = "20.18.1"
NODE_VERSION = "22.12.0"

[[redirects]]
from = "/"
Expand All @@ -18,4 +18,4 @@
[[redirects]]
from = "/:page"
to = "/demo/:page"
status = 200
status = 200
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.4.3",
"@vitejs/plugin-react": "^5.2.0",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/coverage-v8": "^4.1.2",
"@vitest/ui": "^4.1.2",
"bundlewatch": "^0.4.0",
Expand All @@ -112,7 +112,7 @@
"react-i18next": "^13.0.0 || ^14.0.0 || ^15.0.0",
"redux-mock-store": "^1.5.1",
"redux-saga-test-plan": "^4.0.0-rc.3",
"vite": "^7.3.1",
"vite": "8.0.10",
"vitest": "^4.1.2",
"vitest-fetch-mock": "^0.4.2"
},
Expand Down
3 changes: 1 addition & 2 deletions vite-umd.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import fs from 'fs/promises';

/**
* Vite configuration
Expand All @@ -14,7 +13,7 @@ export default defineConfig({
formats: ['umd'],
name: 'Mirador',
},
rollupOptions: {
rolldownOptions: {
external: [
'__tests__/*',
'__mocks__/*',
Expand Down
8 changes: 4 additions & 4 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig({
...(
process.env.NETLIFY ? {
build: {
rollupOptions: {
rolldownOptions: {
external: ['__tests__/*', '__mocks__/*'],
input: Object.fromEntries(
globSync('./demo/*.html').map((file) => [
Expand All @@ -39,11 +39,11 @@ export default defineConfig({
formats: ['es'],
name: 'Mirador',
},
rollupOptions: {
external: (id, parentId) => {
rolldownOptions: {
external: (id) => {
const peers = Object.keys(packageJson.peerDependencies);
return peers.indexOf(id) > -1
|| peers.find((peer) => id.startsWith(`${peer}/`))
|| peers.some((peer) => id.startsWith(`${peer}/`))
|| id.startsWith('__tests__/')
|| id.startsWith('__mocks__/');
},
Expand Down
24 changes: 6 additions & 18 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { fileURLToPath } from 'url';
import fs from 'fs/promises';

export default defineConfig({
esbuild: {
oxc: {
exclude: [],
include: /(src|__tests__)\/.*\.jsx?$/,
loader: 'jsx',
},
optimizeDeps: {
esbuildOptions: {
plugins: [
{
name: 'load-js-files-as-jsx',
/** */
setup(build) {
build.onLoad({ filter: /(src|__tests__)\/.*\.js$/ }, async (args) => ({
contents: await fs.readFile(args.path, 'utf8'),
loader: 'jsx',
}));
},
},
],
rolldownOptions: {
moduleTypes: {
'.js': 'jsx',
},
},
},
plugins: [react()],
Expand Down
Loading