Giter Site home page Giter Site logo

icai / webpack-bfms Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 2.8 MB

react and vue, single page and multi page, in one project

License: MIT License

JavaScript 45.18% HTML 34.54% Vue 16.43% CSS 0.37% Smarty 3.48%
vue react vue-multi-page react-multi-page multi-page-application single-page-app

webpack-bfms's Introduction

webpack-bfms

react and vue multi page in one project

基于 https://github.com/icai/bfms 改进, 支持泛生态技术.

何为泛生态技术?

  • 提问:

为什么一个项目不能同时使用Vue, React, Angular

当然一个项目用一种技术呈现是最好不过的,但是很多时候迫不得已。

多页应用,多页应用更符合主流场景,转换单页应用 (N->1) 零成本


约定

  • vue 不使用 jsx 语法
  • react 使用 jsx语法

.babelrc

{
  "presets": [
    'react',
    ["env", {
      "modules": false,
      "targets": {
        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
      }
    }],
    "stage-2"
  ],
  "plugins": ["transform-react-jsx", "transform-runtime"],
  "env": {
    "test": {
      "presets": ["env", "stage-2"],
      "plugins": ["transform-react-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
    }
  }
}

单页多页双开

同时支持单页多页,双开模式,但是建议只用一种技术框架
双开模式以 Vue 为例,并引入 https://github.com/PanJiaChen/vue-element-admin 部分页面为示例

查看分支 single-multi


参考

https://github.com/PanJiaChen/vue-element-admin
https://github.com/Plortinus/vue-multiple-pages
https://github.com/webpack/webpack-dev-server
https://github.com/nodeca/mincer
https://github.com/vuejs/vue-cli
https://github.com/vue-template/webpack
https://github.com/facebook/create-react-app

webpack-bfms's People

Contributors

icai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.