Nihilist Pocket Monsters

    babel-preset-solid

    1.6.2 • Public • Published

    babel-preset-solid

    Babel preset to transform JSX into Solid runtime calls.

    Install

    Via NPM

    npm install babel-preset-solid --save-dev

    or Yarn

    yarn add babel-preset-solid --dev

    Usage

    Make or update your .babelrc config file with the preset:

    {
      "presets": [
        "solid"
      ]
    }

    Via package.json

       ...
       "babel": {
         "presets": [
           "es2015",
           "solid"
         ],
         "plugins": [
         ]
       },
       ...

    Usage for SSR code

    When need to tranform JSX code to be used on the server, pass the following options

    {
      "presets": [
        ["solid", { "generate": "ssr", "hydratable": true }]
      ]
    }

    And for the browser build pass the hydratable option as well:

    {
      "presets": [
        ["solid", { "generate": "dom", "hydratable": true }]
      ]
    }

    Keywords

    none

    Install

    npm i babel-preset-solid

    DownloadsWeekly Downloads

    37,155

    Version

    1.6.2

    License

    MIT

    Unpacked Size

    3.32 kB

    Total Files

    4

    Last publish

    Collaborators

    • ryansolid