kibana/packages/kbn-ui-shared-deps-npm/index.js
Cee Chen 866adf37f1
Delete imports/references to EUI's distributed .css files (#194237)
## Summary

Trying #194082 again, this time wholly deleting
`kbn-ui-shared-deps-npm.v8.light/dark.css` as well 🤞

Original PR description: 

> These files no longer contain any meaningful CSS used within Kibana as
of EUI's completed Emotion migration, and can be safely removed. EUI
will shortly no longer distribute these static `.css` files (although
`.scss` src files will still remain exported for the near future).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-09-30 13:37:47 -05:00

47 lines
1.5 KiB
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/
/**
* @typedef {'v8'} ThemeVersion
*/
const Fs = require('fs');
const Path = require('path');
const { REPO_ROOT } = require('@kbn/repo-info');
const localDist = Path.resolve(__dirname, './shared_built_assets');
const bazelDist = Path.resolve(REPO_ROOT, 'bazel-bin', Path.relative(REPO_ROOT, localDist));
// extracted const vars
const distDir = Fs.existsSync(localDist) ? localDist : bazelDist;
const dllManifestPath = Path.resolve(distDir, 'kbn-ui-shared-deps-npm-manifest.json');
const dllFilename = 'kbn-ui-shared-deps-npm.dll.js';
const publicPathLoader = require.resolve('./src/public_path_loader');
module.exports = {
/**
* Absolute path to the distributable directory
*/
distDir,
/**
* Path to dll manifest of modules included in this bundle
*/
dllManifestPath,
/**
* Filename of the main bundle file in the distributable directory
*/
dllFilename,
/**
* Webpack loader for configuring the public path lookup from `window.__kbnPublicPath__`.
*/
publicPathLoader,
};