GithubHelp home page GithubHelp logo

hzfe / mina-webpack-plugin Goto Github PK

View Code? Open in Web Editor NEW
4.0 12.0 0.0 19 KB

小程序 webpack 插件

Home Page: https://hzfe.github.io/mina-webpack-plugin/

License: MIT License

JavaScript 100.00%
minapp webpack

mina-webpack-plugin's Introduction

mina-webpack-plugin

npm npm

使用 webpack 开发原生小程序的优势

  1. 比使用小程序开发者工具自带编译功能或使用 gulp,用 webpack 进行小程序开发更靠近 web 开发的体验,webpack 社区庞大,解决方案更多。
    • 正常使用 npm 包;
    • tree shaking;
    • 使用 webpack loader / plugin;
    • alias。
  2. 如果你没有一份代码支持多端的需求,那么相比使用各大小程序框架,使用 webpack 开发原生小程序:
    • 不用担心框架不再维护;
    • 不用学习不同框架的各类语法糖;
    • 不用在踩小程序坑的基础上还要踩框架的坑。

mina-webpack-plugin 介绍

作用

  1. 读取 app.json 配置自动收集所有入口模块;
  2. 配合 splitChunk 把通用依赖自动引入进文件中;

使用方法

npm i @hzfe/mina-webpack-plugin --save-dev
{
  plugins: [
    /**
     * 可以传一个对象参数
     * options = {
     *   extensions: [".js"], // defalt
     *   assetsChunkName: "__assets_chunk_name__", // default
     * }
     **/
    new MinaPlugin(),
  ];
}

相关项目

License

MIT

mina-webpack-plugin's People

Contributors

akiq2016 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.