Giter VIP home page Giter VIP logo

build2webpack's Introduction

webpack2build

即安即用的webpack开发工具

Install

 npm i build2webpack -D

package.json scripts

package.json文件中添加如下脚本命令

"scripts": {
    "start": "build2webpack-start",
    "build": "build2webpack-build",
    "dev": "npm start"
},

scripts 说明

命令 说明
start 启动开发环境
build 打包构建项目

config 文件说明

配置文件需要创建于根目录下的config/index.js

dev

字段 说明
host 主机 - localhost
port 端口
proxyTable 代理转发配置
useEslint 使用eslint
extendLoader 用于扩展loader配置
autoOpenBrowser 自动打开浏览器
errorOverlay 全屏错误提示
showEslintErrorsInOverlay 全屏eslint错误提示
assetsPublicPath 资源路径
devtool sourcemap 配置
poll 轮询
preProcessorsCss 预编译css, 可传字符串或数组。'less' or ['less', 'stylus']
assetsSubDirectory 静态资源目录
cssSourceMap css sourcemap
define 定义开发环境下变量

build

字段 说明
bundleAnalyzerReport 开启包分析
index 入口index.html路径
assetsRoot assetsRoot 路径
assetsSubDirectory 静态资源文件名
assetsPublicPath 静态资源文件名路径
productionSourceMap 是否开启生产环境 sourcemap
preProcessorsCss 预编译css, 可传字符串或数组。'less' or ['less', 'stylus']
devtool sourcemap 配置
define 定义生产环境下变量

build2webpack's People

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.