Giter Club home page Giter Club logo

webpack4-demo's Introduction

webpack4 demo

这是一个webpack4的node.js案例。

  • Node.js
  • Koa
  • vue
  • Webpack
  • 多语言
  • 多页面

npm install

首先安装需要的依赖:

npm ci node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

因为依赖node-sass,指定node-sass镜像地址到淘宝镜像地址,加速下载。

build

构建前端页面,启动node.js服务。

前端构建:

npm run webpack

后端服务:

npm run develop //启动node

open 127.0.0.1:4000.

open http://localhost:4000/.

目录结构

  • client 保存前端文件目录(frontEnd源码)
  • server Node服务文件目录(编译完成并注入了js&css的html文件会保存到这个目录下的views)
  • static 静态资源文件目录(所有前端编译后的文件都会保存到这个目录)

版本历史

  • 2018

step_0 单入口,单页面案例 https://github.com/Yi-love/webpack4-demo/tree/step_0

step_1 多入口,多页面案例 https://github.com/Yi-love/webpack4-demo/tree/step_1

step_2 多入口,多页面案例-升级版 https://github.com/Yi-love/webpack4-demo/tree/step_2

  • 2019-05-23

step_3 多入口,多页面,多语言 https://github.com/Yi-love/webpack4-demo/tree/step_3

step_4 【docker】多入口,多页面,多语言 https://github.com/Yi-love/webpack4-demo/tree/step_4

  • 2019-09-30

step_5 多入口,多页面,多语言(框架优化版)) https://github.com/Yi-love/webpack4-demo/tree/step_5

webpack4-demo's People

Contributors

yi-love 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.