From 86f31526c229408b027e8f136612bc0de374634b Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Mon, 11 Dec 2023 16:33:11 +0100 Subject: [PATCH 1/9] chore(examples): migrate vue/default-theme to vite --- examples/vue/default-theme/index.html | 23 ++ examples/vue/default-theme/package.json | 13 +- examples/vue/default-theme/public/index.html | 25 -- examples/vue/default-theme/src/App.vue | 2 - examples/vue/default-theme/src/main.js | 5 +- examples/vue/default-theme/vite.config.mjs | 7 + examples/vue/default-theme/vue.config.js | 6 - yarn.lock | 300 +++++++++++++++++++ 8 files changed, 339 insertions(+), 42 deletions(-) create mode 100644 examples/vue/default-theme/index.html delete mode 100644 examples/vue/default-theme/public/index.html create mode 100644 examples/vue/default-theme/vite.config.mjs delete mode 100644 examples/vue/default-theme/vue.config.js diff --git a/examples/vue/default-theme/index.html b/examples/vue/default-theme/index.html new file mode 100644 index 0000000000..a1301eae64 --- /dev/null +++ b/examples/vue/default-theme/index.html @@ -0,0 +1,23 @@ + + + + + + + default-theme + + + + +
+ + + diff --git a/examples/vue/default-theme/package.json b/examples/vue/default-theme/package.json index 3ac3cd492c..f510e84067 100644 --- a/examples/vue/default-theme/package.json +++ b/examples/vue/default-theme/package.json @@ -3,20 +3,21 @@ "version": "0.34.0", "private": true, "scripts": { - "serve": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve", - "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", - "website:examples": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build --dest ../../../website/examples/vue/default-theme" + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "website:examples": "vite build --outDir ../../../website/examples/vue/default-theme --base /examples/vue/default-theme" }, "dependencies": { "algoliasearch": "4.14.3", - "core-js": "2", "instantsearch.js": "4.62.0", "vue": "2.7.14", "vue-instantsearch": "4.13.1" }, "devDependencies": { - "@vue/cli-plugin-babel": "3.12.1", - "@vue/cli-service": "3.12.1", + "vite": "5.0.7", + "vite-plugin-commonjs": "0.10.0", + "@vitejs/plugin-vue2": "2.3.1", "vue-template-compiler": "2.7.14" }, "postcss": { diff --git a/examples/vue/default-theme/public/index.html b/examples/vue/default-theme/public/index.html deleted file mode 100644 index d1d0966a28..0000000000 --- a/examples/vue/default-theme/public/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - default-theme - - - - - -
- - - diff --git a/examples/vue/default-theme/src/App.vue b/examples/vue/default-theme/src/App.vue index a77c1bd98e..e348079d4c 100644 --- a/examples/vue/default-theme/src/App.vue +++ b/examples/vue/default-theme/src/App.vue @@ -127,8 +127,6 @@ import algoliasearch from 'algoliasearch/lite'; import { history as historyRouter } from 'instantsearch.js/es/lib/routers'; import { simple as simpleMapping } from 'instantsearch.js/es/lib/stateMappings'; -import './App.css'; - export default { data() { return { diff --git a/examples/vue/default-theme/src/main.js b/examples/vue/default-theme/src/main.js index 6c0a207513..11baf5eef5 100644 --- a/examples/vue/default-theme/src/main.js +++ b/examples/vue/default-theme/src/main.js @@ -1,12 +1,11 @@ import Vue from 'vue'; -import InstantSearch from 'vue-instantsearch'; +import InstantSearch from 'vue-instantsearch/vue2/es'; +import './App.css'; import App from './App.vue'; Vue.use(InstantSearch); -Vue.config.productionTip = false; - new Vue({ render: (h) => h(App), }).$mount('#app'); diff --git a/examples/vue/default-theme/vite.config.mjs b/examples/vue/default-theme/vite.config.mjs new file mode 100644 index 0000000000..60569b9043 --- /dev/null +++ b/examples/vue/default-theme/vite.config.mjs @@ -0,0 +1,7 @@ +import vue from '@vitejs/plugin-vue2'; +import { defineConfig } from 'vite'; +import commonjs from 'vite-plugin-commonjs'; + +export default defineConfig({ + plugins: [commonjs(), vue()], +}); diff --git a/examples/vue/default-theme/vue.config.js b/examples/vue/default-theme/vue.config.js deleted file mode 100644 index e956a5b790..0000000000 --- a/examples/vue/default-theme/vue.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - publicPath: './', - devServer: { - disableHostCheck: true, - }, -}; diff --git a/yarn.lock b/yarn.lock index 5d1d089fae..200e3d5ce8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1985,16 +1985,126 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@esbuild/android-arm64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.9.tgz#683794bdc3d27222d3eced7b74cad15979548031" + integrity sha512-q4cR+6ZD0938R19MyEW3jEsMzbb/1rulLXiNAJQADD/XYp7pT+rOS5JGxvpRW8dFDEfjW4wLgC/3FXIw4zYglQ== + "@esbuild/android-arm@0.15.18": version "0.15.18" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.18.tgz#266d40b8fdcf87962df8af05b76219bc786b4f80" integrity sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw== +"@esbuild/android-arm@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.9.tgz#21a4de41f07b2af47401c601d64dfdefd056c595" + integrity sha512-jkYjjq7SdsWuNI6b5quymW0oC83NN5FdRPuCbs9HZ02mfVdAP8B8eeqLSYU3gb6OJEaY5CQabtTFbqBf26H3GA== + +"@esbuild/android-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.9.tgz#e2d7674bc025ddc8699f0cc76cb97823bb63c252" + integrity sha512-KOqoPntWAH6ZxDwx1D6mRntIgZh9KodzgNOy5Ebt9ghzffOk9X2c1sPwtM9P+0eXbefnDhqYfkh5PLP5ULtWFA== + +"@esbuild/darwin-arm64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.9.tgz#ae7a582289cc5c0bac15d4b9020a90cb7288f1e9" + integrity sha512-KBJ9S0AFyLVx2E5D8W0vExqRW01WqRtczUZ8NRu+Pi+87opZn5tL4Y0xT0mA4FtHctd0ZgwNoN639fUUGlNIWw== + +"@esbuild/darwin-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.9.tgz#8a216c66dcf51addeeb843d8cfaeff712821d12b" + integrity sha512-vE0VotmNTQaTdX0Q9dOHmMTao6ObjyPm58CHZr1UK7qpNleQyxlFlNCaHsHx6Uqv86VgPmR4o2wdNq3dP1qyDQ== + +"@esbuild/freebsd-arm64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.9.tgz#63d4f603e421252c3cd836b18d01545be7c6c440" + integrity sha512-uFQyd/o1IjiEk3rUHSwUKkqZwqdvuD8GevWF065eqgYfexcVkxh+IJgwTaGZVu59XczZGcN/YMh9uF1fWD8j1g== + +"@esbuild/freebsd-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.9.tgz#a3db52595be65360eae4de1d1fa3c1afd942e1e4" + integrity sha512-WMLgWAtkdTbTu1AWacY7uoj/YtHthgqrqhf1OaEWnZb7PQgpt8eaA/F3LkV0E6K/Lc0cUr/uaVP/49iE4M4asA== + +"@esbuild/linux-arm64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.9.tgz#4ae5811ce9f8d7df5eb9edd9765ea9401a534f13" + integrity sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ== + +"@esbuild/linux-arm@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.9.tgz#9807e92cfd335f46326394805ad488e646e506f2" + integrity sha512-C/ChPohUYoyUaqn1h17m/6yt6OB14hbXvT8EgM1ZWaiiTYz7nWZR0SYmMnB5BzQA4GXl3BgBO1l8MYqL/He3qw== + +"@esbuild/linux-ia32@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.9.tgz#18892c10f3106652b16f9da88a0362dc95ed46c7" + integrity sha512-f37i/0zE0MjDxijkPSQw1CO/7C27Eojqb+r3BbHVxMLkj8GCa78TrBZzvPyA/FNLUMzP3eyHCVkAopkKVja+6Q== + "@esbuild/linux-loong64@0.15.18": version "0.15.18" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz#128b76ecb9be48b60cf5cfc1c63a4f00691a3239" integrity sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ== +"@esbuild/linux-loong64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.9.tgz#dc2ebf9a125db0a1bba18c2bbfd4fbdcbcaf61c2" + integrity sha512-t6mN147pUIf3t6wUt3FeumoOTPfmv9Cc6DQlsVBpB7eCpLOqQDyWBP1ymXn1lDw4fNUSb/gBcKAmvTP49oIkaA== + +"@esbuild/linux-mips64el@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.9.tgz#4c2f7c5d901015e3faf1563c4a89a50776cb07fd" + integrity sha512-jg9fujJTNTQBuDXdmAg1eeJUL4Jds7BklOTkkH80ZgQIoCTdQrDaHYgbFZyeTq8zbY+axgptncko3v9p5hLZtw== + +"@esbuild/linux-ppc64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.9.tgz#8385332713b4e7812869622163784a5633f76fc4" + integrity sha512-tkV0xUX0pUUgY4ha7z5BbDS85uI7ABw3V1d0RNTii7E9lbmV8Z37Pup2tsLV46SQWzjOeyDi1Q7Wx2+QM8WaCQ== + +"@esbuild/linux-riscv64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.9.tgz#23f1db24fa761be311874f32036c06249aa20cba" + integrity sha512-DfLp8dj91cufgPZDXr9p3FoR++m3ZJ6uIXsXrIvJdOjXVREtXuQCjfMfvmc3LScAVmLjcfloyVtpn43D56JFHg== + +"@esbuild/linux-s390x@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.9.tgz#2dffe497726b897c9f0109e774006e25b33b4fd0" + integrity sha512-zHbglfEdC88KMgCWpOl/zc6dDYJvWGLiUtmPRsr1OgCViu3z5GncvNVdf+6/56O2Ca8jUU+t1BW261V6kp8qdw== + +"@esbuild/linux-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.9.tgz#ceb1d62cd830724ff5b218e5d3172a8bad59420e" + integrity sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A== + +"@esbuild/netbsd-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.9.tgz#0cbca65e9ef4d3fc41502d3e055e6f49479a8f18" + integrity sha512-GThgZPAwOBOsheA2RUlW5UeroRfESwMq/guy8uEe3wJlAOjpOXuSevLRd70NZ37ZrpO6RHGHgEHvPg1h3S1Jug== + +"@esbuild/openbsd-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.9.tgz#1f57adfbee09c743292c6758a3642e875bcad1cf" + integrity sha512-Ki6PlzppaFVbLnD8PtlVQfsYw4S9n3eQl87cqgeIw+O3sRr9IghpfSKY62mggdt1yCSZ8QWvTZ9jo9fjDSg9uw== + +"@esbuild/sunos-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.9.tgz#116be6adbd2c7479edeeb5f6ea0441002ab4cb9c" + integrity sha512-MLHj7k9hWh4y1ddkBpvRj2b9NCBhfgBt3VpWbHQnXRedVun/hC7sIyTGDGTfsGuXo4ebik2+3ShjcPbhtFwWDw== + +"@esbuild/win32-arm64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.9.tgz#2be22131ab18af4693fd737b161d1ef34de8ca9d" + integrity sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg== + +"@esbuild/win32-ia32@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.9.tgz#e10ead5a55789b167b4225d2469324538768af7c" + integrity sha512-UOozV7Ntykvr5tSOlGCrqU3NBr3d8JqPes0QWN2WOXfvkWVGRajC+Ym0/Wj88fUgecUCLDdJPDF0Nna2UK3Qtg== + +"@esbuild/win32-x64@0.19.9": + version "0.19.9" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.9.tgz#b2da6219b603e3fa371a78f53f5361260d0c5585" + integrity sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ== + "@eslint/eslintrc@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.5.tgz#33f1b838dbf1f923bfa517e008362b78ddbbf318" @@ -2869,6 +2979,11 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== +"@jridgewell/sourcemap-codec@^1.4.15": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -5389,6 +5504,71 @@ resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-1.0.0.tgz#05bb0031533598f9458cf65a502b8df0eecae780" integrity sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w== +"@rollup/rollup-android-arm-eabi@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.8.0.tgz#0e42b155630adaaec0f659f979ece4b7d3391329" + integrity sha512-zdTObFRoNENrdPpnTNnhOljYIcOX7aI7+7wyrSpPFFIOf/nRdedE6IYsjaBE7tjukphh1tMTojgJ7p3lKY8x6Q== + +"@rollup/rollup-android-arm64@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.8.0.tgz#6c9fe8f9eb0cd9029be93b822b1a1c2d6b31c275" + integrity sha512-aiItwP48BiGpMFS9Znjo/xCNQVwTQVcRKkFKsO81m8exrGjHkCBDvm9PHay2kpa8RPnZzzKcD1iQ9KaLY4fPQQ== + +"@rollup/rollup-darwin-arm64@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.8.0.tgz#7dcb1317a8089762c1f7e437c1e1d695b787b70f" + integrity sha512-zhNIS+L4ZYkYQUjIQUR6Zl0RXhbbA0huvNIWjmPc2SL0cB1h5Djkcy+RZ3/Bwszfb6vgwUvcVJYD6e6Zkpsi8g== + +"@rollup/rollup-darwin-x64@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.8.0.tgz#91d7d31d22607c4fcccce9126457d6785c57f7c7" + integrity sha512-A/FAHFRNQYrELrb/JHncRWzTTXB2ticiRFztP4ggIUAfa9Up1qfW8aG2w/mN9jNiZ+HB0t0u0jpJgFXG6BfRTA== + +"@rollup/rollup-linux-arm-gnueabihf@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.8.0.tgz#f2015d6e4ff41417f2e2c55b3d9625346e355c57" + integrity sha512-JsidBnh3p2IJJA4/2xOF2puAYqbaczB3elZDT0qHxn362EIoIkq7hrR43Xa8RisgI6/WPfvb2umbGsuvf7E37A== + +"@rollup/rollup-linux-arm64-gnu@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.8.0.tgz#95207444b78f235c9de62797ec2a3dcd18daf473" + integrity sha512-hBNCnqw3EVCkaPB0Oqd24bv8SklETptQWcJz06kb9OtiShn9jK1VuTgi7o4zPSt6rNGWQOTDEAccbk0OqJmS+g== + +"@rollup/rollup-linux-arm64-musl@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.8.0.tgz#bc994c676fd3aae14aaa905040fdcde461e41ce5" + integrity sha512-Fw9ChYfJPdltvi9ALJ9wzdCdxGw4wtq4t1qY028b2O7GwB5qLNSGtqMsAel1lfWTZvf4b6/+4HKp0GlSYg0ahA== + +"@rollup/rollup-linux-riscv64-gnu@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.8.0.tgz#67984f1d1f663610f4e1f6e638a2b07169562448" + integrity sha512-BH5xIh7tOzS9yBi8dFrCTG8Z6iNIGWGltd3IpTSKp6+pNWWO6qy8eKoRxOtwFbMrid5NZaidLYN6rHh9aB8bEw== + +"@rollup/rollup-linux-x64-gnu@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.8.0.tgz#48e09a455d543be986003c7c2ea37c16ff4a53d5" + integrity sha512-PmvAj8k6EuWiyLbkNpd6BLv5XeYFpqWuRvRNRl80xVfpGXK/z6KYXmAgbI4ogz7uFiJxCnYcqyvZVD0dgFog7Q== + +"@rollup/rollup-linux-x64-musl@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.8.0.tgz#df8d0966b02d1bdc6447b5eb58fa18666da1f3e8" + integrity sha512-mdxnlW2QUzXwY+95TuxZ+CurrhgrPAMveDWI97EQlA9bfhR8tw3Pt7SUlc/eSlCNxlWktpmT//EAA8UfCHOyXg== + +"@rollup/rollup-win32-arm64-msvc@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.8.0.tgz#7cce8efc5c9239a1bafe7ac2a52743bc5734471f" + integrity sha512-ge7saUz38aesM4MA7Cad8CHo0Fyd1+qTaqoIo+Jtk+ipBi4ATSrHWov9/S4u5pbEQmLjgUjB7BJt+MiKG2kzmA== + +"@rollup/rollup-win32-ia32-msvc@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.8.0.tgz#794ef4058d04f97447e4434c083b1309b2be73c2" + integrity sha512-p9E3PZlzurhlsN5h9g7zIP1DnqKXJe8ZUkFwAazqSvHuWfihlIISPxG9hCHCoA+dOOspL/c7ty1eeEVFTE0UTw== + +"@rollup/rollup-win32-x64-msvc@4.8.0": + version "4.8.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.8.0.tgz#05057436705f0be9203c30612a48225ec70af741" + integrity sha512-kb4/auKXkYKqlUYTE8s40FcJIj5soOyRLHKd4ugR0dCq0G2EfcF54eYcfQiGkHzjidZ40daB4ulsFdtqNKZtBg== + "@rushstack/eslint-patch@^1.0.8": version "1.1.0" resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.1.0.tgz#7f698254aadf921e48dda8c0a6b304026b8a9323" @@ -6995,6 +7175,11 @@ "@typescript-eslint/types" "5.9.0" eslint-visitor-keys "^3.0.0" +"@vitejs/plugin-vue2@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue2/-/plugin-vue2-2.3.1.tgz#53078d3d9d50d9863f1fbb1c1ef7791a5fcd4948" + integrity sha512-/ksaaz2SRLN11JQhLdEUhDzOn909WEk99q9t9w+N12GjQCljzv7GyvAbD/p20aBUjHkvpGOoQ+FCOkG+mjDF4A== + "@vscode/emmet-helper@^2.8.4": version "2.8.4" resolved "https://registry.yarnpkg.com/@vscode/emmet-helper/-/emmet-helper-2.8.4.tgz#ab937e3ce79b0873c604d1ad50a9eeb7abae2937" @@ -7843,6 +8028,11 @@ acorn@^8.0.4, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1, acorn@^8.8 resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== +acorn@^8.8.2: + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -13684,6 +13874,11 @@ es-module-lexer@^0.10.5: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.10.5.tgz#06f76d51fa53b1f78e3bd8bb36dd275eda2fdd53" integrity sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw== +es-module-lexer@^1.2.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5" + integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w== + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" @@ -13863,6 +14058,34 @@ esbuild@^0.15.16, esbuild@^0.15.9: esbuild-windows-64 "0.15.18" esbuild-windows-arm64 "0.15.18" +esbuild@^0.19.3: + version "0.19.9" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.9.tgz#423a8f35153beb22c0b695da1cd1e6c0c8cdd490" + integrity sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg== + optionalDependencies: + "@esbuild/android-arm" "0.19.9" + "@esbuild/android-arm64" "0.19.9" + "@esbuild/android-x64" "0.19.9" + "@esbuild/darwin-arm64" "0.19.9" + "@esbuild/darwin-x64" "0.19.9" + "@esbuild/freebsd-arm64" "0.19.9" + "@esbuild/freebsd-x64" "0.19.9" + "@esbuild/linux-arm" "0.19.9" + "@esbuild/linux-arm64" "0.19.9" + "@esbuild/linux-ia32" "0.19.9" + "@esbuild/linux-loong64" "0.19.9" + "@esbuild/linux-mips64el" "0.19.9" + "@esbuild/linux-ppc64" "0.19.9" + "@esbuild/linux-riscv64" "0.19.9" + "@esbuild/linux-s390x" "0.19.9" + "@esbuild/linux-x64" "0.19.9" + "@esbuild/netbsd-x64" "0.19.9" + "@esbuild/openbsd-x64" "0.19.9" + "@esbuild/sunos-x64" "0.19.9" + "@esbuild/win32-arm64" "0.19.9" + "@esbuild/win32-ia32" "0.19.9" + "@esbuild/win32-x64" "0.19.9" + escalade@^3.0.2, escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -15770,6 +15993,11 @@ fsevents@^2.1.2, fsevents@^2.3.2, fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== +fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -20755,6 +20983,13 @@ magic-string@^0.25.1, magic-string@^0.25.2, magic-string@^0.25.3, magic-string@^ dependencies: sourcemap-codec "^1.4.8" +magic-string@^0.30.1: + version "0.30.5" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9" + integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -22499,6 +22734,11 @@ nanoid@^3.1.23, nanoid@^3.3.4: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + nanomatch@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" @@ -25321,6 +25561,15 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2 picocolors "^0.2.1" source-map "^0.6.1" +postcss@^8.4.32: + version "8.4.32" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9" + integrity sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.0.2" + posthtml-parser@^0.10.0, posthtml-parser@^0.10.1: version "0.10.2" resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.10.2.tgz#df364d7b179f2a6bf0466b56be7b98fd4e97c573" @@ -27735,6 +27984,26 @@ rollup@^2.79.1: optionalDependencies: fsevents "~2.3.2" +rollup@^4.2.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.8.0.tgz#365c34e85f1ed034de974dab934c1663cc69b754" + integrity sha512-NpsklK2fach5CdI+PScmlE5R4Ao/FSWtF7LkoIrHDxPACY/xshNasPsbpG0VVHxUTbf74tJbVT4PrP8JsJ6ZDA== + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.8.0" + "@rollup/rollup-android-arm64" "4.8.0" + "@rollup/rollup-darwin-arm64" "4.8.0" + "@rollup/rollup-darwin-x64" "4.8.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.8.0" + "@rollup/rollup-linux-arm64-gnu" "4.8.0" + "@rollup/rollup-linux-arm64-musl" "4.8.0" + "@rollup/rollup-linux-riscv64-gnu" "4.8.0" + "@rollup/rollup-linux-x64-gnu" "4.8.0" + "@rollup/rollup-linux-x64-musl" "4.8.0" + "@rollup/rollup-win32-arm64-msvc" "4.8.0" + "@rollup/rollup-win32-ia32-msvc" "4.8.0" + "@rollup/rollup-win32-x64-msvc" "4.8.0" + fsevents "~2.3.2" + router-ips@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/router-ips/-/router-ips-1.0.0.tgz#44e00858ebebc0133d58e40b2cd8a1fbb04203f5" @@ -31727,6 +31996,37 @@ vfile@^5.0.0, vfile@^5.3.2: unist-util-stringify-position "^3.0.0" vfile-message "^3.0.0" +vite-plugin-commonjs@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/vite-plugin-commonjs/-/vite-plugin-commonjs-0.10.0.tgz#b748361e761b2d4d9ef8c76be36508cc54ca0a98" + integrity sha512-tl0/fy4VJ9yMjL4QocviiDan1iyKvUIY7Pn+pn6rpWyyqdprzgP4s2UFXoMiJIVYMV6oJ5goyAHZMKJkS/CxPA== + dependencies: + acorn "^8.8.2" + fast-glob "^3.2.12" + magic-string "^0.30.1" + vite-plugin-dynamic-import "^1.5.0" + +vite-plugin-dynamic-import@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/vite-plugin-dynamic-import/-/vite-plugin-dynamic-import-1.5.0.tgz#a28f4768da977f0e448009489617aec259180b63" + integrity sha512-Qp85c+AVJmLa8MLni74U4BDiWpUeFNx7NJqbGZyR2XJOU7mgW0cb7nwlAMucFyM4arEd92Nfxp4j44xPi6Fu7g== + dependencies: + acorn "^8.8.2" + es-module-lexer "^1.2.1" + fast-glob "^3.2.12" + magic-string "^0.30.1" + +vite@5.0.7: + version "5.0.7" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.7.tgz#ad081d735f6769f76b556818500bdafb72c3fe93" + integrity sha512-B4T4rJCDPihrQo2B+h1MbeGL/k/GMAHzhQ8S0LjQ142s6/+l3hHTT095ORvsshj4QCkoWu3Xtmob5mazvakaOw== + dependencies: + esbuild "^0.19.3" + postcss "^8.4.32" + rollup "^4.2.0" + optionalDependencies: + fsevents "~2.3.3" + vite@~3.2.5: version "3.2.5" resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.5.tgz#dee5678172a8a0ab3e547ad4148c3d547f90e86a" From d4c91c1e3e656fbfef71626e33468d4beaf100c9 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Mon, 11 Dec 2023 16:41:22 +0100 Subject: [PATCH 2/9] !postcss --- examples/vue/default-theme/package.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/vue/default-theme/package.json b/examples/vue/default-theme/package.json index f510e84067..cb5f30f848 100644 --- a/examples/vue/default-theme/package.json +++ b/examples/vue/default-theme/package.json @@ -20,11 +20,6 @@ "@vitejs/plugin-vue2": "2.3.1", "vue-template-compiler": "2.7.14" }, - "postcss": { - "plugins": { - "autoprefixer": {} - } - }, "browserslist": [ "> 1%", "last 2 versions", From 3cb6c81812c2ef158ecd457123222240f5d5bc4f Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Mon, 11 Dec 2023 16:47:12 +0100 Subject: [PATCH 3/9] !readme --- examples/vue/default-theme/README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/vue/default-theme/README.md b/examples/vue/default-theme/README.md index 5211201b16..f3bccb0e42 100644 --- a/examples/vue/default-theme/README.md +++ b/examples/vue/default-theme/README.md @@ -11,7 +11,7 @@ yarn install ### Compiles and hot-reloads for development ``` -yarn run serve +yarn run dev ``` ### Compiles and minifies for production @@ -19,9 +19,3 @@ yarn run serve ``` yarn run build ``` - -### Lints and fixes files - -``` -yarn run lint -``` From 71667bab808f675be8565d53fe0fe6c1746b212b Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Mon, 11 Dec 2023 16:50:17 +0100 Subject: [PATCH 4/9] !productionTip --- examples/vue/default-theme/src/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/vue/default-theme/src/main.js b/examples/vue/default-theme/src/main.js index 11baf5eef5..a4df97a182 100644 --- a/examples/vue/default-theme/src/main.js +++ b/examples/vue/default-theme/src/main.js @@ -6,6 +6,8 @@ import App from './App.vue'; Vue.use(InstantSearch); +Vue.config.productionTip = false; + new Vue({ render: (h) => h(App), }).$mount('#app'); From fd541a7588000ec721ac62d9402cd2b12285b2e3 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Mon, 11 Dec 2023 17:00:29 +0100 Subject: [PATCH 5/9] remaining apps --- examples/vue/e-commerce/README.md | 8 +------ .../vue/e-commerce/{public => }/index.html | 5 +++-- examples/vue/e-commerce/package.json | 18 ++++++--------- examples/vue/e-commerce/src/App.vue | 5 ----- examples/vue/e-commerce/src/main.js | 4 ++++ examples/vue/e-commerce/vite.config.mjs | 7 ++++++ examples/vue/e-commerce/vue.config.js | 6 ----- examples/vue/getting-started/README.md | 22 +++++++++---------- .../getting-started/{public => }/index.html | 4 ++-- examples/vue/getting-started/package.json | 11 +++------- examples/vue/getting-started/vite.config.mjs | 7 ++++++ examples/vue/getting-started/vue.config.js | 5 ----- examples/vue/media/README.md | 8 +------ examples/vue/media/{public => }/index.html | 4 ++-- examples/vue/media/package.json | 18 ++++++--------- examples/vue/media/src/App.vue | 2 -- examples/vue/media/src/main.js | 1 + examples/vue/media/vite.config.mjs | 7 ++++++ examples/vue/media/vue.config.js | 6 ----- yarn.lock | 4 ++-- 20 files changed, 65 insertions(+), 87 deletions(-) rename examples/vue/e-commerce/{public => }/index.html (83%) create mode 100644 examples/vue/e-commerce/vite.config.mjs delete mode 100644 examples/vue/e-commerce/vue.config.js rename examples/vue/getting-started/{public => }/index.html (89%) create mode 100644 examples/vue/getting-started/vite.config.mjs delete mode 100644 examples/vue/getting-started/vue.config.js rename examples/vue/media/{public => }/index.html (88%) create mode 100644 examples/vue/media/vite.config.mjs delete mode 100644 examples/vue/media/vue.config.js diff --git a/examples/vue/e-commerce/README.md b/examples/vue/e-commerce/README.md index 1e6f445121..814258c492 100644 --- a/examples/vue/e-commerce/README.md +++ b/examples/vue/e-commerce/README.md @@ -11,7 +11,7 @@ yarn install ### Compiles and hot-reloads for development ``` -yarn run serve +yarn run dev ``` ### Compiles and minifies for production @@ -19,9 +19,3 @@ yarn run serve ``` yarn run build ``` - -### Lints and fixes files - -``` -yarn run lint -``` diff --git a/examples/vue/e-commerce/public/index.html b/examples/vue/e-commerce/index.html similarity index 83% rename from examples/vue/e-commerce/public/index.html rename to examples/vue/e-commerce/index.html index d850363344..29e4bb8ed9 100644 --- a/examples/vue/e-commerce/public/index.html +++ b/examples/vue/e-commerce/index.html @@ -8,8 +8,8 @@ /> - - + + You need to enable JavaScript to run this app.
+ diff --git a/examples/vue/e-commerce/package.json b/examples/vue/e-commerce/package.json index cca0c76dd9..ea84f3d3b6 100644 --- a/examples/vue/e-commerce/package.json +++ b/examples/vue/e-commerce/package.json @@ -3,28 +3,24 @@ "version": "0.34.0", "private": true, "scripts": { - "serve": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve", - "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", - "website:examples": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build --dest ../../../website/examples/vue/e-commerce" + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "website:examples": "vite build --outDir ../../../website/examples/vue/e-commerce --base /examples/vue/e-commerce" }, "dependencies": { "algoliasearch": "4.14.3", - "core-js": "2", "instantsearch.js": "4.62.0", "vue": "2.7.14", "vue-instantsearch": "4.13.1", "vue-slider-component": "3.0.32" }, "devDependencies": { - "@vue/cli-plugin-babel": "3.12.1", - "@vue/cli-service": "3.12.1", + "vite": "5.0.7", + "vite-plugin-commonjs": "0.10.0", + "@vitejs/plugin-vue2": "2.3.1", "vue-template-compiler": "2.7.14" }, - "postcss": { - "plugins": { - "autoprefixer": {} - } - }, "browserslist": [ "> 1%", "last 2 versions", diff --git a/examples/vue/e-commerce/src/App.vue b/examples/vue/e-commerce/src/App.vue index f2cc367476..adfe749cea 100644 --- a/examples/vue/e-commerce/src/App.vue +++ b/examples/vue/e-commerce/src/App.vue @@ -497,11 +497,6 @@ import { formatNumber } from './utils'; import ClearRefinements from './widgets/ClearRefinements.vue'; import NoResults from './widgets/NoResults.vue'; -import './Theme.css'; -import './App.css'; -import './App.mobile.css'; -import './widgets/PriceSlider.css'; - export default { components: { VueSlider, diff --git a/examples/vue/e-commerce/src/main.js b/examples/vue/e-commerce/src/main.js index 6c0a207513..f8313f697e 100644 --- a/examples/vue/e-commerce/src/main.js +++ b/examples/vue/e-commerce/src/main.js @@ -1,6 +1,10 @@ import Vue from 'vue'; import InstantSearch from 'vue-instantsearch'; +import './Theme.css'; +import './App.css'; +import './App.mobile.css'; +import './widgets/PriceSlider.css'; import App from './App.vue'; Vue.use(InstantSearch); diff --git a/examples/vue/e-commerce/vite.config.mjs b/examples/vue/e-commerce/vite.config.mjs new file mode 100644 index 0000000000..60569b9043 --- /dev/null +++ b/examples/vue/e-commerce/vite.config.mjs @@ -0,0 +1,7 @@ +import vue from '@vitejs/plugin-vue2'; +import { defineConfig } from 'vite'; +import commonjs from 'vite-plugin-commonjs'; + +export default defineConfig({ + plugins: [commonjs(), vue()], +}); diff --git a/examples/vue/e-commerce/vue.config.js b/examples/vue/e-commerce/vue.config.js deleted file mode 100644 index 9714eb69ad..0000000000 --- a/examples/vue/e-commerce/vue.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - publicPath: '/examples/vue/e-commerce', - devServer: { - disableHostCheck: true, - }, -}; diff --git a/examples/vue/getting-started/README.md b/examples/vue/getting-started/README.md index db39630746..db18a97795 100644 --- a/examples/vue/getting-started/README.md +++ b/examples/vue/getting-started/README.md @@ -4,20 +4,20 @@ _This project was generated with [create-instantsearch-app](https://github.com/algolia/instantsearch/tree/master/packages/create-instantsearch-app) by [Algolia](https://algolia.com)._ -## Get started +## Project setup -To run this project locally, install the dependencies and run the local server: - -```sh -npm install -npm start +``` +yarn install ``` -Alternatively, you may use [Yarn](https://http://yarnpkg.com/): +### Compiles and hot-reloads for development -```sh -yarn -yarn start +``` +yarn run dev ``` -Open http://localhost:3000 to see your app. +### Compiles and minifies for production + +``` +yarn run build +``` diff --git a/examples/vue/getting-started/public/index.html b/examples/vue/getting-started/index.html similarity index 89% rename from examples/vue/getting-started/public/index.html rename to examples/vue/getting-started/index.html index 09f24212a0..e44e3bf2e2 100644 --- a/examples/vue/getting-started/public/index.html +++ b/examples/vue/getting-started/index.html @@ -4,7 +4,7 @@ - + + diff --git a/examples/vue/getting-started/package.json b/examples/vue/getting-started/package.json index 4e07bdaffe..e3c68935cc 100644 --- a/examples/vue/getting-started/package.json +++ b/examples/vue/getting-started/package.json @@ -8,21 +8,16 @@ }, "dependencies": { "algoliasearch": "4.14.3", - "core-js": "2", "instantsearch.js": "4.62.0", "vue": "2.7.14", "vue-instantsearch": "4.13.1" }, "devDependencies": { - "@vue/cli-plugin-babel": "3.12.1", - "@vue/cli-service": "3.12.1", + "vite": "5.0.7", + "vite-plugin-commonjs": "0.10.0", + "@vitejs/plugin-vue2": "2.3.1", "vue-template-compiler": "2.7.14" }, - "postcss": { - "plugins": { - "autoprefixer": {} - } - }, "browserslist": [ "> 1%", "last 2 versions", diff --git a/examples/vue/getting-started/vite.config.mjs b/examples/vue/getting-started/vite.config.mjs new file mode 100644 index 0000000000..60569b9043 --- /dev/null +++ b/examples/vue/getting-started/vite.config.mjs @@ -0,0 +1,7 @@ +import vue from '@vitejs/plugin-vue2'; +import { defineConfig } from 'vite'; +import commonjs from 'vite-plugin-commonjs'; + +export default defineConfig({ + plugins: [commonjs(), vue()], +}); diff --git a/examples/vue/getting-started/vue.config.js b/examples/vue/getting-started/vue.config.js deleted file mode 100644 index dfb359974a..0000000000 --- a/examples/vue/getting-started/vue.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - devServer: { - disableHostCheck: true, - }, -}; diff --git a/examples/vue/media/README.md b/examples/vue/media/README.md index 80a6ead75c..7ae1e6dfd1 100644 --- a/examples/vue/media/README.md +++ b/examples/vue/media/README.md @@ -11,7 +11,7 @@ yarn install ### Compiles and hot-reloads for development ``` -yarn run serve +yarn run dev ``` ### Compiles and minifies for production @@ -19,9 +19,3 @@ yarn run serve ``` yarn run build ``` - -### Lints and fixes files - -``` -yarn run lint -``` diff --git a/examples/vue/media/public/index.html b/examples/vue/media/index.html similarity index 88% rename from examples/vue/media/public/index.html rename to examples/vue/media/index.html index 5b3c53d619..96d30c497b 100644 --- a/examples/vue/media/public/index.html +++ b/examples/vue/media/index.html @@ -16,7 +16,7 @@ rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.1.0/themes/algolia-min.css" /> - + media @@ -28,6 +28,6 @@ >
- + diff --git a/examples/vue/media/package.json b/examples/vue/media/package.json index 1832887770..0534d940b7 100644 --- a/examples/vue/media/package.json +++ b/examples/vue/media/package.json @@ -3,27 +3,23 @@ "version": "0.34.0", "private": true, "scripts": { - "serve": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve", - "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", - "website:examples": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build --dest ../../../website/examples/vue/media" + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "website:examples": "vite build --outDir ../../../website/examples/vue/media --base /examples/vue/media" }, "dependencies": { "algoliasearch": "4.14.3", - "core-js": "2", "instantsearch.js": "4.62.0", "vue": "2.7.14", "vue-instantsearch": "4.13.1" }, "devDependencies": { - "@vue/cli-plugin-babel": "3.12.1", - "@vue/cli-service": "3.12.1", + "vite": "5.0.7", + "vite-plugin-commonjs": "0.10.0", + "@vitejs/plugin-vue2": "2.3.1", "vue-template-compiler": "2.7.14" }, - "postcss": { - "plugins": { - "autoprefixer": {} - } - }, "browserslist": [ "> 1%", "last 2 versions", diff --git a/examples/vue/media/src/App.vue b/examples/vue/media/src/App.vue index 6a32d6a2b5..c4293840ab 100644 --- a/examples/vue/media/src/App.vue +++ b/examples/vue/media/src/App.vue @@ -116,8 +116,6 @@ import algoliasearch from 'algoliasearch/lite'; import { history as historyRouter } from 'instantsearch.js/es/lib/routers'; import { simple as simpleMapping } from 'instantsearch.js/es/lib/stateMappings'; -import './App.css'; - export default { data() { return { diff --git a/examples/vue/media/src/main.js b/examples/vue/media/src/main.js index 6c0a207513..7389d703e2 100644 --- a/examples/vue/media/src/main.js +++ b/examples/vue/media/src/main.js @@ -1,6 +1,7 @@ import Vue from 'vue'; import InstantSearch from 'vue-instantsearch'; +import './App.css'; import App from './App.vue'; Vue.use(InstantSearch); diff --git a/examples/vue/media/vite.config.mjs b/examples/vue/media/vite.config.mjs new file mode 100644 index 0000000000..60569b9043 --- /dev/null +++ b/examples/vue/media/vite.config.mjs @@ -0,0 +1,7 @@ +import vue from '@vitejs/plugin-vue2'; +import { defineConfig } from 'vite'; +import commonjs from 'vite-plugin-commonjs'; + +export default defineConfig({ + plugins: [commonjs(), vue()], +}); diff --git a/examples/vue/media/vue.config.js b/examples/vue/media/vue.config.js deleted file mode 100644 index e956a5b790..0000000000 --- a/examples/vue/media/vue.config.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - publicPath: './', - devServer: { - disableHostCheck: true, - }, -}; diff --git a/yarn.lock b/yarn.lock index 200e3d5ce8..568ed0c509 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7301,7 +7301,7 @@ resolved "https://registry.yarnpkg.com/@vue/cli-overlay/-/cli-overlay-3.12.1.tgz#bdfde8f7123561ab06e4e4c60b854cc5092f5ab1" integrity sha512-Bym92EN+lj+cNRN2ozbYyH+V8DMXWGbCDUk+hiJ4EYDBZfBkZKvalk1/mOBFwyxiopnnbOEBAAhL/UuMQ1xARg== -"@vue/cli-plugin-babel@3.12.1", "@vue/cli-plugin-babel@^3.4.1": +"@vue/cli-plugin-babel@^3.4.1": version "3.12.1" resolved "https://registry.yarnpkg.com/@vue/cli-plugin-babel/-/cli-plugin-babel-3.12.1.tgz#9a79159de8cd086b013fa6d78a39830b2e2ec706" integrity sha512-Zetvz8PikLCGomeKOKu8pC9YQ7cfxs7pGpvEOzaxGdhMnebhjAYR6i6dOB57A6N5lhxQksXCtYTv26QgfiIpdg== @@ -7312,7 +7312,7 @@ babel-loader "^8.0.5" webpack "^4.0.0" -"@vue/cli-service@3.12.1", "@vue/cli-service@^3.4.1": +"@vue/cli-service@^3.4.1": version "3.12.1" resolved "https://registry.yarnpkg.com/@vue/cli-service/-/cli-service-3.12.1.tgz#13220b1c189254e7c003390df329086f9b6e77e6" integrity sha512-PDxNrTGnSKzeV1ruFlsRIAO8JcPizwT0EJXq9GeyooU+p+sOkv7aKkCBJQVYNjZapD1NOGWx6CvAAC/wAW+gew== From c6f92785d57b680805088dcd5e17301e33db5c28 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Mon, 11 Dec 2023 17:01:46 +0100 Subject: [PATCH 6/9] !getting-started --- examples/vue/getting-started/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/vue/getting-started/package.json b/examples/vue/getting-started/package.json index e3c68935cc..fcc1d8185b 100644 --- a/examples/vue/getting-started/package.json +++ b/examples/vue/getting-started/package.json @@ -3,8 +3,9 @@ "version": "1.0.20", "private": true, "scripts": { - "start": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve --port 3000", - "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build" + "dev": "vite", + "build": "vite build", + "preview": "vite preview" }, "dependencies": { "algoliasearch": "4.14.3", From 4c994390466f1af0dc2782c51660dad3ba0884de Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Mon, 11 Dec 2023 17:26:10 +0100 Subject: [PATCH 7/9] chore(specs): update astro to have same esbuild version --- specs/package.json | 2 +- specs/src/components/Header.astro | 4 +- specs/src/layouts/MainLayout.astro | 2 +- specs/src/pages/index.astro | 2 +- yarn.lock | 2991 ++++++++++++---------------- 5 files changed, 1295 insertions(+), 1706 deletions(-) diff --git a/specs/package.json b/specs/package.json index b3f4562fd3..d9f6afe1b5 100644 --- a/specs/package.json +++ b/specs/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@types/node": "18.11.13", - "astro": "1.6.14", + "astro": "4.0.4", "instantsearch.css": "8.1.0", "sass": "1.56.2" } diff --git a/specs/src/components/Header.astro b/specs/src/components/Header.astro index ee2b844a72..7c3f3c8f63 100644 --- a/specs/src/components/Header.astro +++ b/specs/src/components/Header.astro @@ -10,9 +10,9 @@ const { BASE_URL } = import.meta.env;