🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@tinajs/mina-runtime-webpack-plugin

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinajs/mina-runtime-webpack-plugin

A runtime patch for compiling mina project by Webpack

latest
Source
npmnpm
Version
1.3.7
Version published
Weekly downloads
50
-94.82%
Maintainers
3
Weekly downloads
 
Created
Source

mina-runtime-webpack-plugin

A runtime patch for compiling mina project by Webpack.

npm npm license PRs Welcome

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

FAQs

Package last updated on 07 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts