You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My solution en Vuejs with Vite
In file vite.config.js
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
// Identifica si el comando actual es para servir la aplicación en desarrollo
const isDevelopment = process.env.NODE_ENV !== 'production';
export default defineConfig({
plugins: [vue()],
define: {
// En producción, redefine lunr como una variable global con elasticlunr
'lunr': 'window.elasticlunr'
}
});
Has anyone tried modifying elasticlunr to not use global variables?
I use elasticlunr in my Zola site. https://abridge.netlify.app/ (repo)
The text was updated successfully, but these errors were encountered: