From f3bbef1ce33b31939aad2593ba68158d0852d984 Mon Sep 17 00:00:00 2001 From: Aleksey Smolenchuk Date: Wed, 17 Apr 2019 10:32:03 -0700 Subject: [PATCH] Add brotli and svgo flags; allow babel excludes; overrideWebpackConfig option in .fusionrc.js; remove scary messages --- .gitignore | 1 + README.md | 5 ++-- build/compiler.js | 14 ++++++++--- build/get-webpack-config.js | 34 ++++++++++++++++++++++----- build/load-fusionrc.js | 25 +++++++++----------- commands/build.js | 6 +++++ docs/fusionrc.md | 46 +++++++++++++++++++++++++++++++++---- 7 files changed, 101 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index e74b1da9..7f289cd8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules/ .nyc_output/ yarn-error.log coverage/ +.vscode diff --git a/README.md b/README.md index 3cc54f61..a0cf9050 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,6 @@ The CLI interface for Fusion.js The `fusion-cli` package is responsible for orchestrating compile-time configuration for server and browser bundles, as well as development, test and production variations. It provides a standardized Babel configuration that includes async/await support as well as stage 3+ Ecmascript features. -Due to the complexity involved in configuring many permutations of configurations, Fusion.js does not support custom `webpack.config`. This design decision allows Fusion.js to eventually move away from Webpack if faster and better bundlers become available. Additionally, it allows Fusion.js to make changes to the internal webpack configuration without the concern of breaking users customizations. If you run into a situation where you feel you need to make a webpack customization, please reach out to us on [slack](https://join.slack.com/t/fusionjs/shared_invite/enQtMzk3NjM0MTg0MTI4LWJhNzVjYjk5ZDVlYWIxZWViMjA3YzE5OTc4YWZkNzBkZmNkYmJkMDYyOGEzODEwMzRmMWExMzc1NDIzMmY2NDQ) or create an issue describing your use case. - The CLI is also responsible for hot module reloading in development mode, and for running the web server. ### Installation @@ -43,6 +41,9 @@ The CLI API can be most easily run through the Yarn or NPX CLI, e.g. `yarn fusio - `--log-level`: Log level to output to console `[default: "info"]` - `--forceLegacyBuild`: Force enable legacy build. By default not compiled in dev. - `--perserve-names`: Disable name mangling during script minification + - `--no-zofpli`: Disable zopfli compression plugin + - `--no-brotli`: Disable brotli compression plugin + - `--no-svgo`: Disable svgo optimization plugin