Giter Club home page Giter Club logo

express-svelte's People

Contributors

maxiruani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

express-svelte's Issues

Typescript not working

It seems like you can't use typescript:

/nodejs/main/.express-svelte/browser/main/Main.js โ†’ public/dist...
[!] (plugin svelte) ParseError: Unexpected token
src/views/main/lib/Counter.svelte
1: <script lang="ts">
2:   import { setCookie } from 'typescript-cookie'
3:   export let count: number = 0
                     ^
4:   const increment = () => {
5:     count += 1
ParseError: Unexpected token
    at error (/nodejs/main/node_modules/svelte/src/compiler/utils/error.ts:25:16)
    at Parser$1.error (/nodejs/main/node_modules/svelte/src/compiler/parse/index.ts:101:3)
    at Parser$1.acorn_error (/nodejs/main/node_modules/svelte/src/compiler/parse/index.ts:94:8)
    at Object.read_script [as read] (/nodejs/main/node_modules/svelte/src/compiler/parse/read/script.ts:39:10)
    at tag (/nodejs/main/node_modules/svelte/src/compiler/parse/state/tag.ts:189:27)
    at new Parser$1 (/nodejs/main/node_modules/svelte/src/compiler/parse/index.ts:53:12)
    at parse (/nodejs/main/node_modules/svelte/src/compiler/parse/index.ts:218:17)
    at compile (/nodejs/main/node_modules/svelte/src/compiler/compile/index.ts:94:14)
    at Object.transform (/nodejs/main/node_modules/express-svelte/node_modules/rollup-plugin-svelte/index.js:111:21)

Svelte reactivity does not work

I making simple Svelte number counter component (view):

<script>
  let counter = 0
</script>

<button on:click={() => ++counter}>{counter}</button>

button click does not work, I look up dev tool it seems no client script in response, only plain html.

"express": "^4.18.1"
"express-svelte": "^1.0.8"
"rollup": "^2.75.7"
"svelte": "^3.48.0"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.