@tinajs/wxs-loader
v1.2.12
Published
wxs loader for webpack
Downloads
20
Readme
wxs-loader
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
| Name | Default | Description |
| ------- | -------------- | ----------------------------------------------------------------------------------------------------------- |
| name | [hash].[ext]
| Custom filename template, same as file-loader - name |
| context | context
| Same as file-loader - context |
| regExp | undefined
| Same as file-loader - regExp |
Example
License
Apache-2.0 © yelo, 2018 - present