halfnelson / svelte-native-preprocessor

The Svelte preprocessor for Svelte-Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Svelte Native Preprocessor

A pre processor for Svelte-Native.

It performs the following transforms to provide a better developer experience when using Svelte-Native:

  • Changes bind:text="{email}" to text="{email}" on:textChanged="{e => email = e.value}"

Installation

Using nativescript-webpack >= 5.0.0 add to your svelte.config.js

const svelteNativePreprocessor = require("./svelte-native-preprocessor");

module.exports = {
    compilerOptions: {
        namespace: 'foreign'
    },
    preprocess: [svelteNativePreprocessor() /*, other preprocesser eg sveltePreprocessor() here */]
}

License

MIT.

About

The Svelte preprocessor for Svelte-Native

License:MIT License


Languages

Language:TypeScript 96.0%Language:JavaScript 4.0%