Commit Graph

7 Commits

Author SHA1 Message Date
Tim Lai
0121b18ddf chore(deps-dev): bump sass-loader from 9.0.3 to 12.6.0 (#8191) 2022-09-21 15:38:33 -07: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
Tim Lai
eb04d9ef66 chore(webpack): sass-loader with sassOptions (#7089) 2021-03-17 13:06:06 -07:00
Tim Lai
12eb6f34dc chore(webpack): use postcss-preset-env plugin (#7084) 2021-03-16 18:27:17 -07:00
Tim Lai
a75f2c67fd chore(deps-dev): css-loader cumulative deps and config update (#6596)
* css-loader@5
* postcss@8 peer dependency
* postcss-loader@4
* update webpack config with postcssOptions
2020-11-09 11:23:31 -08:00
Tim Lai
20b32d8b90 fix(build): css stylesheets bundle config and deps (#6315) 2020-08-18 16:05:31 -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