Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(NA): moving @kbn/ui-shared-deps into bazel #101669

Merged
merged 21 commits into from
Jun 18, 2021
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
82843a7
chore(NA): moving @kbn/io-ts-utils into bazel
mistic May 27, 2021
8117d2d
Merge remote-tracking branch 'upstream/master' into move-kbn-io-ts-ut…
mistic May 27, 2021
be2024d
chore(NA): moving @kbn/ui-shared-deps into bazel
mistic May 27, 2021
6ae9749
chore(NA): merge and solve conflicts with master
mistic Jun 9, 2021
844b906
chore(NA): compelte working build for @kbn/ui-shared-deps
mistic Jun 9, 2021
5e32dc3
chore(NA): solve eslint problems
mistic Jun 9, 2021
e369814
chore(NA): solve typechecking
mistic Jun 9, 2021
fccd4cf
chore(NA): debugger changes
mistic Jun 9, 2021
7d9006a
chore(NA): update optimizer basic integration tests
mistic Jun 9, 2021
c770a19
chore(NA): ship kbn/ui-shared-deps metrics.json from new location at …
mistic Jun 9, 2021
193d3f9
chore(NA): use correct ui-shared-deps metrics file location
mistic Jun 9, 2021
8142ffd
Merge remote-tracking branch 'upstream/master' into move-kbn-ui-share…
mistic Jun 9, 2021
c4707ba
Merge remote-tracking branch 'upstream/master' into move-kbn-ui-share…
mistic Jun 10, 2021
f9c6b9d
chore(NA): remove webpack bazel config
mistic Jun 11, 2021
f0063e3
Merge branch 'master' into move-kbn-ui-shared-deps-into-bazel
kibanamachine Jun 12, 2021
e5356f2
Merge branch 'master' into move-kbn-ui-shared-deps-into-bazel
kibanamachine Jun 14, 2021
b72028c
Merge branch 'master' into move-kbn-ui-shared-deps-into-bazel
kibanamachine Jun 17, 2021
141c9d4
chore(NA): implement improvements on webpack config
mistic Jun 17, 2021
ba86e2b
chore(NA): remove extra comment
mistic Jun 17, 2021
bffc49a
chore(NA): try esbuild-loader minimizer
mistic Jun 17, 2021
b59264c
Revert "chore(NA): try esbuild-loader minimizer"
mistic Jun 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/kbn-ui-shared-deps/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*/

const Path = require('path');
const Os = require('os');

const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

const CompressionPlugin = require('compression-webpack-plugin');
const { REPO_ROOT } = require('@kbn/utils');
const webpack = require('webpack');
const { RawSource } = require('webpack-sources');

const UiSharedDeps = require('./src/index');
Expand All @@ -31,14 +31,16 @@ module.exports = {
'kbn-ui-shared-deps.v8.light': ['@elastic/eui/dist/eui_theme_amsterdam_light.css'],
},
context: __dirname,
devtool: '#cheap-source-map',
//
mistic marked this conversation as resolved.
Show resolved Hide resolved
devtool: 'cheap-source-map',
output: {
path: UiSharedDeps.distDir,
filename: '[name].js',
sourceMapFilename: '[file].map',
devtoolModuleFilenameTemplate: (info) =>
`kbn-ui-shared-deps/${Path.relative(REPO_ROOT, info.absoluteResourcePath)}`,
library: '__kbnSharedDeps__',
futureEmitAssets: true,
},

module: {
Expand Down Expand Up @@ -110,6 +112,7 @@ module.exports = {
optimization: {
minimizer: [
new CssMinimizerPlugin({
parallel: Math.min(Os.cpus().length, 2),
minimizerOptions: {
preset: [
'default',
Expand All @@ -123,7 +126,7 @@ module.exports = {
cache: false,
sourceMap: false,
extractComments: false,
parallel: false,
parallel: Math.min(Os.cpus().length, 2),
terserOptions: {
compress: true,
mangle: true,
Expand Down Expand Up @@ -154,9 +157,6 @@ module.exports = {
new MiniCssExtractPlugin({
filename: '[name].css',
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"',
}),
new CompressionPlugin({
algorithm: 'brotliCompress',
filename: '[path].br',
Expand Down