Skip to content
Branch: master
Go to file
Clone

Latest commit

Gazler committed 118999e Jun 24, 2020
Speed up build times for webpack (#3899)
On an unmodified default generated project (with --live) using the
Phoenix 1.5.3 installer, the build time is:

    $ webpack --mode development

    Version: webpack 4.41.5
    Time: 1681ms

Changing the source-map mode to `eval-cheap-module-source-map` changes
this time slightly:

    Time: 1397ms

The `hard-source-webpack-plugin` caches intermediate build steps, which
produces significantly faster rebuilds:

    Time: 474ms

Combining these two results in:

    Time: 193ms

This improvement seems to scale well too. On a project including
tailwind, the build time by default is close to 6 seconds, but with the
above config, 212ms.

`eval-cheap-module-source-map` preserves line numbers in the source
maps, but not column information. This seems like a resonable trade off
vs `eval-module-source-map` which is a bit slower.

    Time: 491ms

Files

Permalink
Failed to load latest commit information.

README.md

phoenix logo

Productive. Reliable. Fast.

A productive web framework that does not compromise speed or maintainability.

Build Status Inline docs

Getting started

See the official site at https://www.phoenixframework.org/

Install the latest version of Phoenix by following the instructions at https://hexdocs.pm/phoenix/installation.html#phoenix

Documentation

API documentation is available at https://hexdocs.pm/phoenix

Phoenix.js documentation is available at https://hexdocs.pm/phoenix/js

Contributing

We appreciate any contribution to Phoenix. Check our CODE_OF_CONDUCT.md and CONTRIBUTING.md guides for more information. We usually keep a list of features and bugs in the issue tracker.

Generating a Phoenix project from unreleased versions

You can create a new project using the latest Phoenix source installer (the phx.new Mix task) with the following steps:

  1. Remove any previously installed phx_new archives so that Mix will pick up the local source code. This can be done with mix archive.uninstall phx_new or by simply deleting the file, which is usually in ~/.mix/archives/.
  2. Copy this repo via git clone https://github.com/phoenixframework/phoenix or by downloading it
  3. Run the phx.new mix task from within the installer directory, for example:
$ cd installer
$ mix phx.new dev_app --dev

The --dev flag will configure your new project's :phoenix dep as a relative path dependency, pointing to your local Phoenix checkout:

defp deps do
  [{:phoenix, path: "../..", override: true},

To create projects outside of the installer/ directory, add the latest archive to your machine by following the instructions in installer/README.md

To build the documentation from source:

$ npm install --prefix assets
$ MIX_ENV=docs mix docs

To build Phoenix from source:

$ mix deps.get
$ mix compile

To build the Phoenix installer from source:

$ mix deps.get
$ mix compile
$ mix archive.build

Building phoenix.js

$ cd assets
$ npm install
$ npm run watch

Important links

Copyright and License

Copyright (c) 2014, Chris McCord.

Phoenix source code is licensed under the MIT License.

You can’t perform that action at this time.