@lucashc/mini-program-loader
mini program loader for webpack
Last updated a year ago by lucashc .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lucashc/mini-program-loader 
SYNC missed versions from official npm registry.

mini-program-loader

mini program loader for webpack, forked from wxapp-boilerplate, added support for Baidu smart app.

Installation

yarn add -D @lucashc/mini-program-loader

Usage

You may also need to use file-loader to extract files.

{
  test: /\.wxml$/,
  include: /src/,
  use: [
    {
      loader: 'file-loader',
      options: {
        name: '[name].[ext]',
        useRelativePath: true,
        context: resolve('src'),
      },
    },
    {
      loader: '@lucashc/mini-program-loader-loader',
      options: {
        root: resolve('src'),
        enforceRelativePath: true,
      },
    },
  ],
}
Options
  • root (String): Root path for requiring sources
  • enforceRelativePath (Boolean): Should be true if you wish to generate a root relative URL for each file. It is recommend to set to true
  • publicPath (String): Defaults to webpack output.publicPath
  • transformContent(content, resource) (Function): Transform content, should return a content string
  • transformUrl(url, resource) (Function): Transform url, should return a url
  • minimize (Boolean): To minimize. Defaults to false
  • All html-minifier options are supported

License

MIT

Current Tags

  • 0.0.5                                ...           latest (a year ago)

5 Versions

  • 0.0.5                                ...           a year ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |