You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2017/10/02 20:39:58 UTC
[47/50] [abbrv] ambari git commit: AMBARI-22106 Log Search UI:
incorrect link to third-party scripts bundle. (ababiichuk)
AMBARI-22106 Log Search UI: incorrect link to third-party scripts bundle. (ababiichuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f92da65f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f92da65f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f92da65f
Branch: refs/heads/branch-feature-AMBARI-20859
Commit: f92da65f7d643d40e7cde0113b1f34c608fb7827
Parents: 3889ddf
Author: ababiichuk <ab...@hortonworks.com>
Authored: Mon Oct 2 11:02:18 2017 +0300
Committer: ababiichuk <ab...@hortonworks.com>
Committed: Mon Oct 2 11:48:37 2017 +0300
----------------------------------------------------------------------
.../ambari-logsearch-web/webpack.config.js | 21 ++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f92da65f/ambari-logsearch/ambari-logsearch-web/webpack.config.js
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-web/webpack.config.js b/ambari-logsearch/ambari-logsearch-web/webpack.config.js
index c608d10..7a60df2 100644
--- a/ambari-logsearch/ambari-logsearch-web/webpack.config.js
+++ b/ambari-logsearch/ambari-logsearch-web/webpack.config.js
@@ -75,6 +75,8 @@ const postcssPlugins = function () {
].concat(minimizeCss ? [cssnano(minimizeOptions)] : []);
};
+const resourcesDirName = 'resources';
+
module.exports = {
"resolve": {
"extensions": [
@@ -109,9 +111,9 @@ module.exports = {
]
},
"output": {
- "path": path.join(process.cwd(), "dist/resources"),
- "publicPath": "resources/",
- "filename": "[name].bundle.js",
+ "path": path.join(process.cwd(), "dist"),
+ "publicPath": "",
+ "filename": `${resourcesDirName}/[name].bundle.js`,
"chunkFilename": "[id].chunk.js"
},
"module": {
@@ -130,11 +132,11 @@ module.exports = {
},
{
"test": /\.(eot|svg|cur)$/,
- "loader": "file-loader?name=[name].[ext]"
+ "loader": `file-loader?name=${resourcesDirName}/[name].[ext]`
},
{
"test": /\.(jpg|png|webp|gif|otf|ttf|woff|woff2|ani)$/,
- "loader": "url-loader?name=[name].[ext]&limit=10000"
+ "loader": `url-loader?name=${resourcesDirName}/[name].[ext]&limit=10000`
},
{
"exclude": [
@@ -408,7 +410,7 @@ module.exports = {
"uglify": false,
"sourceMap": true,
"name": "scripts",
- "fileName": "../resources/[name].bundle.js",
+ "fileName": `${resourcesDirName}/[name].bundle.js`,
"filesToConcat": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
@@ -421,7 +423,7 @@ module.exports = {
new CopyWebpackPlugin([
{
"context": "src/",
- "to": "",
+ "to": resourcesDirName,
"from": {
"glob": "assets/**/*",
"dot": true
@@ -429,7 +431,7 @@ module.exports = {
},
{
"context": "src/",
- "to": "../favicon.ico",
+ "to": "favicon.ico",
"from": {
"glob": "favicon.ico",
"dot": true
@@ -449,7 +451,7 @@ module.exports = {
new NamedLazyChunksWebpackPlugin(),
new HtmlWebpackPlugin({
"template": "./src/index.html",
- "filename": "../index.html",
+ "filename": "index.html",
"hash": false,
"inject": true,
"compile": true,
@@ -533,7 +535,6 @@ module.exports = {
"setImmediate": false
},
"devServer": {
- "contentBase": path.join(process.cwd(), "dist"),
"historyApiFallback": true
}
};