Giter Site home page Giter Site logo

Comments (3)

GoBrianGo avatar GoBrianGo commented on May 11, 2024

image
打包的这个publicPath是在easywebpack写死的,如果我需要改呢?

from egg-vue-webpack-boilerplate.

GoBrianGo avatar GoBrianGo commented on May 11, 2024

知道了,在webpack.config.js中定义

from egg-vue-webpack-boilerplate.

hubcarl avatar hubcarl commented on May 11, 2024

估计你是dev开发模式, prod模式会小很多。

打包有三种模式,开发模式(dev),测试模式(test),线上模式(prod). config.env : 目前支持 dev, test, prod 三种环境, 默认 dev

  • dev : 开启热更新(config.hot=true), js (config.miniJs=false), image (config.miniImage=false), css (config.miniCss=false) 不压缩, 不 hash (confg.hash=false)

  • test : 开启热更新(config.hot=false), js (config.miniJs=false), image (config.miniImage=false), css (config.miniCss=false) 不压缩, hash (config.hash=true)

  • prod : 开启热更新(config.hot=false), js (config.miniJs=true), image (config.miniImage=true), css (config.miniCss=true) 压缩, hash (config.hash=true)

  • 本地开发(dev)时, 为了支持 css hot reload, css 样式必须 inline, 所以默认构建是全部 inline css (config.cssExtract=false), test 和 prod 环境时, css是独立出css文件(config.cssExtract=true)

你可以通过 easy build dev / easy build test / easy build prod 构建, 具体请见:https://github.com/hubcarl/easywebpack-cli

API文档:http://hubcarl.github.io/easywebpack/webpack/config/

from egg-vue-webpack-boilerplate.

Related Issues (20)

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.