0.1.10 • Published 10 months ago

taro-plugin-style-resource v0.1.10

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

taro-plugin-style-resource

Taro 构建编译插件,给lessstylus添加公共样式资源

使用

安装

npm i taro-plugin-style-resource

# yarn
yarn add taro-plugin-style-resource

使用插件

/config/index.js

const path = require("path");
// 示例, 如果你使用 `vs code` 作为开发工具, 你还可以使用注释的语法引入插件包含的声明文件,可获得类似于typescript的友好提示
/**
 * @typedef { import("taro-plugin-style-resource").PluginOptions } PluginOptions
 * @type {PluginOptions}
 */
const pluginOptions = {
  less: {
    patterns: [path.resolve(__dirname, "..", "src/styles/index.less")],
  },
};
const config = {
  plugins: [["taro-plugin-style-resource", pluginOptions]],
};

API

插件配置

参数类型说明
lessObjectstyle-resources-loader的配置
stylusObjectstyle-resources-loader的配置

支持平台

平台名称是否支持
H5
微信小程序
京东小程序
百度小程序
支付宝小程序
字节跳动小程序
QQ 小程序
钉钉小程序
企业微信小程序
支付宝 IOT 小程序
飞书小程序
快手小程序
小红书小程序
ReactNative
0.1.10

10 months ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago