vaheqelyan / svelte-grid

A responsive, draggable and resizable grid layout, for Svelte.

Home Page:https://svelte-grid.now.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not run basic example

werto87 opened this issue · comments

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
  • 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.

commented

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";

It works. Thank you - appreciate the quick response.