1.3.7 • Published 4 years ago
@tinajs/mina-runtime-webpack-plugin v1.3.7
mina-runtime-webpack-plugin
A runtime patch for compiling mina project by Webpack.
Heavily inspired by and forked from Cap32/wxapp-webpack-plugin.
Installation
npm i --save-dev @tinajs/mina-runtime-webpack-plugin
Usage
/**
* webpack.config.js
*/
const webpack = require('webpack')
const MinaRuntimePlugin = require('@tinajs/mina-runtime-webpack-plugin')
const resolve = require('path').resolve
module.exports = {
context: resolve('src'),
entry: {
'app.mina': './app.mina',
'pages/home.mina': './pages/home.mina',
},
output: {
path: resolve('dist'),
filename: '[name]',
publicPath: '/',
globalObject: 'wx',
},
module: {
rules: [
{
test: /\.mina$/,
use: {
loader: '@tinajs/mina-loader',
},
},
],
},
plugins: [new MinaRuntimePlugin()],
optimization: {
splitChunks: {
chunks: 'all',
name: 'common.js',
minChunks: 2,
minSize: 0,
},
runtimeChunk: {
name: 'runtime.js',
},
},
mode: 'none',
}
For the best particle, you might also be interested in mina-webpack.
Example
License
MIT © yelo, 2017 - present
1.3.7
4 years ago
1.3.6
5 years ago
1.3.5
5 years ago
1.3.4
5 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
6 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
1.0.0-10
6 years ago
1.0.0-9
6 years ago
1.0.0-8
6 years ago
1.0.0-7
6 years ago
1.0.0-6
6 years ago
1.0.0-4
6 years ago
1.0.0-3
6 years ago
1.0.0-2
6 years ago
1.0.0-1
6 years ago
1.0.0-0
6 years ago
0.1.5
6 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago