Closed jorgelaranjo closed 1 year ago
I've tried your code example and the mini filter seems to work for me. Which version of AG Grid are you using?
If I had to guess, there might be something going on with Vite. Could you try the suggestions here? https://github.com/MichaelKim/ag-grid-svelte/issues/2#issuecomment-1334808155
Edit: it's not supported yet, but if you happen to be using AG Grid v30, could you try adding this to your Vite config:
const config = {
...,
ssr: {
noExternal: ['ag-grid-community', 'ag-grid-enterprise']
}
};
Using version 29.3.5
solved the issue without the need to configure vite.config.js
The goal is to use
agSetColumnFilter
but cannot get ag-grid-enterprise to load regardless of being on<script>
or<script context=module>
Error is
23:13:58 [vite] Error when evaluating SSR module /src/routes/aggrid/+page.svelte: failed to import "ag-grid-enterprise"
SyntaxError: Cannot use import statement outside a module
Code based on
https://github.com/MichaelKim/ag-grid-svelte/issues/7#issuecomment-1455015701