Skip to content

phy-lei/tarojs-plugin-solid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

de94b3c · Dec 5, 2024
Mar 22, 2024
Mar 4, 2024
Jan 22, 2024
Apr 25, 2024
Mar 8, 2024
Mar 6, 2024
Jan 22, 2024
Jan 19, 2024
Jan 19, 2024
Mar 6, 2024
Jan 20, 2024
Dec 5, 2024
Mar 22, 2024
Apr 25, 2024
Jan 20, 2024
Jan 20, 2024

Repository files navigation

Taro Plugin Solid(已合到taro4.x版本,优先使用taro官方版本)

使用 Solid 开发小程序。

这是图片

示例cli

可以用此空白模板github作为你项目起始点。

安装与使用

可以先使用taro创建一个项目模板,Taro 安装及使用

安装插件

pnpm add tarojs-plugin-solid tarojs-solid-custom-render

当然了还需要安装solid-js。

pnpm add solid-js

配置

1.在 Taro 项目的 config/index.ts 中修改配置,将 framework 更改为 solid

const config = {
    framework: 'solid',
    plugins: ['tarojs-plugin-solid'],
}

2.修改babel的配置,将solid的自定义render器加入preset。

module.exports = {
  presets: [
    [
      "taro",
      {
        framework: "solid",
        ts: true,
      },
    ],
    // 设置自定义custom-render编译
    [
      "babel-preset-solid-taro",
      {
        moduleName: "tarojs-solid-custom-render",
        generate: "universal",
      },
    ],
  ],
};

License

MIT

About

使用solidjs开发小程序🤖

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published