Commit Graph

17 Commits

Author SHA1 Message Date
Vladimír Gorej
11957fb868 chore: regenerate package-lock.json (#8411)
package-lock.json was regenerated using Node@16.13.2
and npm@8.1.2. Along with that, these Node.js and npm
versions were set to .nvmrc file.

Given that the dependency tree now changed,
webpack config resolve aliases needed to be
amended to reflect the current dependency tree.
2023-02-23 16:34:17 +01:00
Vladimir Gorej
7409f41b97 feat(build): expose true ESM bundle as primary artifact (#7937)
Refs #7907
Refs #7831
2022-03-24 12:24:01 +01:00
Tim Lai
07d346b516 feat(build): webpack@5 and webpack-dev-server@4 (#7826)
SwaggerUI is now built using `webpack@5`, with dev support for `webpack-dev-server@4`
- ES Module output bundle path now points to `swagger-ui-es-bundle-core`, which does not include dependencies
- No change to CommonJS output bundle or path
- Now uses Asset Modules, which replaces `file-loader`, `raw-loader`, and `url-loader`
- Removed unused rules/loaders for `.woff | .woff2 | .ttf | .eot` fonts and html
- Node polyfills are no longer bundled with `webpack@5`, and must be loaded separately and/or use `resolve.fallback`. 
As an example, SwaggerUI loads `process`, `buffer`, and `stream-browserify` as `devDependencies` in order to build development and production bundles.

SwaggerUI-React
- Now imports `swagger-ui-es-bundle-core`, and similarly outputs `swagger-ui-es-bundle-core` to its `dist` directory

Dev notes:
- Order of execution matters for the production npm build scripts. `build-stylesheets` needs to get built first, 
then cleanup of any empty artifacts, before building the various production bundles
- `Dev-helpers` now relies on `HTMLWebpackPlugin` to inject css and bundle files
2022-03-01 12:08:50 -08:00
Vladimir Gorej
efff3a6051 build(webpack): remove duplicates from the build
Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
4c369b0027 chore(package-lock): add integrity check info
Refs #7341
2021-11-03 09:49:50 +01:00
Vladimir Gorej
fdef4ead7a fix(build-security): do not expose hostname to build framents (#7491)
Refs #7446
2021-09-10 13:29:42 +03:00
Mahtis Michel
0f092e56af chore(build): increase bundle size limit to 1.1 MiB (#7018) 2021-03-03 14:08:47 -08:00
Mahtis Michel
cdfb64f711 fix(webpack): assets should not be treaded as esModule (#6861) 2021-01-22 10:20:25 -08:00
Tim Lai
3f4db5f474 refactor(build): increase maxEntrypointSize for core-js@3 (#6419) 2020-09-18 11:21:28 -07:00
Timothy Lai
ea5b64bca3 build(webpack): remove LodashModuleReplacementPlugin 2020-07-22 12:40:30 -07:00
Tim Lai
60b411e8c0 build(webpack): enable lodash options (#6248) 2020-07-21 10:49:13 -07:00
Tim Lai
d12662e354 build(webpack): bundle size optimization for lodash (#6244)
* add duplicate code detection check for general purpose use
* webpack alias for lodash
* redux and react-redux dependency bump that removes lodash dependencies
* lodash version match with swagger-client and recent security update
* additional webpack config to help reduce build sizes
* restore max bundle size back to 1024000
2020-07-20 20:26:56 -07:00
Tim Lai
a73783b73d feat: syntax highlighting of code section (#6236)
Co-authored-by: AdrieanKhisbe <adriean.khisbe@live.fr>
2020-07-17 15:29:15 -07:00
Tim Lai
251ea10d94 config: increase max bundle size to 1024 KiB (#6231) 2020-07-16 19:19:21 -07:00
Vladimir Gorej
4f2e8ad7d1 build(webpack): move resolve alises to one common place
As resolving applies to everything and not just specific builds
the resolve.aliases have been moved to one common place.
2020-07-04 11:26:17 +02:00
kyle
2af696dcc1 housekeeping: @kyleshockey/js-yaml -> js-yaml (via #5511)
* `@kyleshockey/js-yaml` -> `js-yaml`

* externalize `esprima`
2019-07-31 14:45:18 -07:00
kyle
88204daad8 housekeeping: upgrade to webpack@4 (via #5454)
* build new core webpack config

* fix exports in Webpack; use ESM syntax throughout

* add bundle config

* add standalone config

* add style config

* prettier...

* add dev config

* delete legacy webpack scripts

* rewire npm scripts to use new webpack configs

* cache babel-loader results

* fix e2e dev servers

* update core Webpack modules

* update loaders to latest

* remove unused loaders

* update Webpack plugins

* add mode flags to Webpack configs

* remove plugin invocations that are now production-standard in v4

* update webpack-cli

* add webpack perf size limit flags

* replace ExtractText with MiniCssExtract + IgnoreAssets

* UglifyJsPlugin -> TerserPlugin

* fix PostCSS processing

* enable Terser sourcemaps

* webpack/style -> webpack/stylesheets
2019-07-11 18:57:44 -05:00