vaheqelyan / svelte-grid

A responsive, draggable and resizable grid layout, for Svelte.
https://svelte-grid.now.sh/
MIT License
948 stars 57 forks source link

Can not run basic example #105

Closed werto87 closed 2 years ago

werto87 commented 2 years ago

I can not run the basic example. In the java script console there is an error:
"Uncaught ReferenceError: Grid is not defined

http://localhost:5000/build/bundle.js:542" What I did: - npx degit sveltejs/template gridTest - cd gridTest/ - npm install - replaced the content of App.svelte with [basic example repl](https://svelte.dev/repl/35a506b9456d463ab441841859e1bb9f?version=3.43.2) - npm i svelte-grid --save-dev - npm run dev In the browser the page is empty. In the java script console there is an error: "Uncaught ReferenceError: Grid is not defined http://localhost:5000/build/bundle.js:542". Tested with Mozilla Firefox 92.0.1 and Google Chrome 91.0.4472.164 on 5.14.8-arch1-1.
vaheqelyan commented 2 years ago

import like this

import Grid from "svelte-grid";
import gridHelp from "svelte-grid/build/helper/index.mjs";

it won't work

import Grid from "svelte-grid@latest";
import gridHelp from "svelte-grid@latest/build/helper/index.mjs";
werto87 commented 2 years ago

It works. Thank you - appreciate the quick response.