1
0
mirror of synced 2025-12-23 03:44:00 -05:00
Files
docs/javascripts
Mike Surowiec a88e99c83a Reactify: release notes (#19799)
* reactify release-notes pages

* update GHAE/ES react release notes to not rely on javascripts/release-notes.js
2021-06-09 20:44:32 +00:00
..
2020-11-17 11:35:19 -05:00
2021-05-06 18:04:28 +00:00
2021-02-09 22:08:24 +00:00
2020-09-27 14:10:11 +02:00
2020-09-27 14:10:11 +02:00
2021-02-23 08:55:01 -08:00
2021-06-04 19:48:56 +00:00

Javascripts

The code in this directory is destined to run in a web browser!

The index.js file in this directory is bundled by Webpack. In development, we use webpack-dev-middleware to bundle automatically while running the server. In production, we run webpack --mode production via npm run build.

This file is then referenced in the footer:

<script src="/dist/index.js"></script>

Every other file in this directory is written as a module to be required in index.js. They all have this format:

module.exports = () => {
  // Do some cool browser stuff
  // Note: by the time this runs, the DOM will be ready. :)
}

In development, the bundle will recompile every time a file used by javascripts/index.js is changed. This ensures that you're always getting an up-to-date version of the script.

In production, the bundle is compiled during build-time.