1.2.12 • Published 3 years ago

@tinajs/wxs-loader v1.2.12

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
3 years ago

wxs-loader

wxs loader for Webpack.

npm npm license PRs Welcome

Installation

npm i --save-dev @tinajs/wxs-loader

Usage

/**
 * webpack.config.js
 */
module.exports = {
  context: resolve('src'),
  mode: 'production',
  entry: {
    'app.mina': './app.mina',
  },
  output: {
    path: resolve('dist'),
    filename: '[name]',
    publicPath: '/',
  },
  module: {
    rules: [
      {
        test: /\.mina$/,
        use: {
          loader: '@tinajs/mina-loader',
        },
      },
      {
        test: /\.wxs$/,
        use: [
          {
            loader: '@tinajs/wxs-loader',
            options: {
              name: 'wxs/[name].[hash:6].[ext]',
            },
          },
        ],
      },
    ],
  },
}

For the best particle, you might also be interested in mina-webpack.

Options

NameDefaultDescription
name[hash].[ext]Custom filename template, same as file-loader - name
contextcontextSame as file-loader - context
regExpundefinedSame as file-loader - regExp

Example

License

Apache-2.0 © yelo, 2018 - present

1.2.12

3 years ago

1.2.11

4 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago