Commit Graph

5 Commits

Author SHA1 Message Date
Dennis Oelkers
6a8994740f Updating to Webpack 5. (#11626)
* Updating to Webpack 5.

* Adding explicit dependency for `buffer`.

* Updating vendor module ids.

* Logging error when loading component async fails.

* Adding root directory of plugin as parameter to `PluginWebpackConfig`.

* Removing unused loaders.

* Revert "Removing unused loaders."

This reverts commit 7ec4d8e0717f0a3eb35c8db829fd91b4d7f8cb03.

* Slight updates of webpack packages.

* Disabling linter hints.

* Adjusting tests.

* Updating terser plugin, removing obsolete source map option.

* Fixing import order.

* Readding `HashedModuleIdsPlugin`.

* Updating yarn lockfile.

* Updating vendor module ids.

* Removing explicit loader references.
2021-12-02 12:11:53 +01:00
Bernd Ahlers
f35df42e16 Change license to SSPL (#9504)
See the following links for more details:

- https://www.graylog.org/post/graylog-announces-4-0-release-of-its-log-management-platform
- https://www.graylog.org/post/graylog-v4-0-licensing-sspl
2020-11-16 18:41:59 +01:00
Dennis Oelkers
e9ac3a6520 Add missing tests for UniqueChunkIdPlugin. (#5128)
* Add missing tests for UniqueChunkIdPlugin.

* Fixing linter hints.
2018-09-18 16:19:17 +02:00
Dennis Oelkers
37d33575f6 Randomize chunk id only once. (#5127)
Before this change, the chunk id of a webpack compilation was being
prefixed with a random, build-specific identifier. This happened for
every compilation, even partial ones (when changing a file during
webpack/webpack-dev-server watch mode). Unfortunately there was no check
if the prefix had already been added, so for every partial compilation
it was added all over again.

This PR introduces a check if the given chunk contains an id which is
already prefixed and skips prefixing it in this case.
2018-09-18 13:52:53 +02:00
Dennis Oelkers
b2a48ff3d2 Using loadable-components to split out pages and brace. (#5121)
* Using loadable-components to split out pages and brace.

* Removing react-proxy-loader.

* Updating yarn.lock

* Create wrapper function to load component asynchronously.

* Loading new sidecar/content pack pages async.

* Updating loadable-components and adding dynamic-import-node plugin for jest.

* Removing deprecated setConfig call.

* Updating yarn.lock.

* Removing visualizer.

* Including simple error component.

* Removing visualizer.

* Updating yarn.lock.

* Separate stores into own chunk, loaded before plugin/app bundles.

Before this change, any (explicit or implicit) consumer of the
`CombinedProvider` module inevitably included all actions/stores in
core.

With this change, the providers are separated from the inclusion of
actions/stores. Actions/stores are now in a separate 'builtins' bundle
which also registers these in the `CombinedProvider` module upon entry.

* Hashing module ids instead of assigning incremented integers.

Before this change, modules were assigned incremented integers, leading
to duplication in plugins or other assets which are built in separate
compilations.

After this change, the module id is created using a hash, decreasing the
risk of collisions by magnitudes.

* Loading stores in tests again.

* Adding webpack plugin generating unique chunk ids.

Before this change, chunk ids in webpack were just integers starting
with 0, incremented by 1 for every chunk. Due to their simple nature,
collisions were unavoidable when building assets in multiple
independent compilations. This lead to failing chunk loading for plugins
loading chunks asynchronously using `import()`.

This change adds a simple webpack hook that generates a random build id
that is appended to each chunk id, making chunk id collisions way less
probable.

* Using CJS syntax for export.

* Fixing linter hints for ServerUnavailablePage.

* Fixing linter hint for AppRouter.

* Fixing linter hint.

* Fixing linter hints for ServerUnavailablePage.

* Improving my counting of small integers.
2018-09-17 16:48:19 +02:00