zoukankan      html  css  js  c++  java
  • webpack浅析

    命令行打包:webpack hello.js hello.bundle.js   --watch (自动更新)  --progress(进度) --display-modules(显示出所有模块)  --color

    文件内用loader解析:require('style-loader!css-loader!./style.css')  css-loader是解析.css文件的引入,命令行形式的:webpack hello.js hello.bundle.js --module-bind 'css=style-loader!css-loader

    entry:'字符串',一个入口文件;

      数组:另个不相干的入口文件chunk,打包到一个main trunk;

      对象:多页面应用,key值是chunk name 文件名,

    output:{

    filename: [name] [hash](打包版本) [chunkhash](各自文件modal的hash,每次打包,变化的文件hash会变,有利于静态资源管理,加载时只需更改改变的文件)

    path:

    }

    html-webpack-plugin: 对模板文件的自动更新引用

    context:运行脚本的上下文

  • 相关阅读:
    Ubuntu16.04 + OpenCV源码 + Qt5.10 安装、配置
    DML和DQL
    初识MySql
    表单校验
    使用jQuery操作DOM
    jQuery中的事件与动画
    jQuery选择器
    初识jQuery
    JavaScript对象及初识OOP
    JavaScript操作DOM对象
  • 原文地址:https://www.cnblogs.com/yxiaoqian/p/7789245.html
Copyright © 2011-2022 走看看