Hi,
I am studying Kibana source code.
I encounter a confusing problem about import path problem.
the source file link is https://github.com/elastic/kibana/blob/7.2/src/legacy/core_plugins/kibana/public/management/index.js
import { management, SidebarNav, MANAGEMENT_BREADCRUMB } from 'ui/management';
But I can find the ui folder in the relative path and the node_modules folder.
Why
Hi @tony21177 ,
The ui/*
is just an alias to another folder, e.g. see here where it points to.
Best,
Oleg
Hi,azasypkin
I find ui_export_defaults.js
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { dirname, resolve } from 'path';
This file has been truncated. show original
line 30
does the import has to do with the webpack alias setting?
By the way, I look up from the webpack documents for import path explanation of Webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.
Thank you so much!
system
(system)
Closed
November 13, 2019, 1:29am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.