0.2.1 • Published 6 years ago

wechat-minap-loader v0.2.1

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

一个微信小程序的编译器


安装

npm install wechat-minap-loader

webpack.config

module.exports = {
  module: {
    rules: [
      {
        test: /\.mina$/,
        loader: 'wechat-minap-loader'
      }
    ]
  }
}

使用方式

最简单的姿势

require('./pages/index/index.mina')

在 app.js 中项目中引入之后会在根目录的 dist 文件夹下生成两份文件分别为

/pages/index/index.wxml
/pages/index/index.wxss

比起返回 babel 转换过的 script 标签中的内容

关于语法

由于使用的是 vue-template-compiler 进行解析,所以语法基本与 vue-loader,相同

比如你想用 pug,那么在 template 标签中加入 lang="pug" 即可

高亮设置

将高亮设置为 vuecomponent 即可

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago