Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4A308200D11 for ; Mon, 2 Oct 2017 10:49:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 487971609EF; Mon, 2 Oct 2017 08:49:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8E1811609DE for ; Mon, 2 Oct 2017 10:49:36 +0200 (CEST) Received: (qmail 98393 invoked by uid 500); 2 Oct 2017 08:49:35 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 98384 invoked by uid 99); 2 Oct 2017 08:49:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Oct 2017 08:49:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id AA285F3287; Mon, 2 Oct 2017 08:49:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ababiichuk@apache.org To: commits@ambari.apache.org Message-Id: <23ae1923c75d48c78f546fd0bba872fa@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-22106 Log Search UI: incorrect link to third-party scripts bundle. (ababiichuk) Date: Mon, 2 Oct 2017 08:49:34 +0000 (UTC) archived-at: Mon, 02 Oct 2017 08:49:37 -0000 Repository: ambari Updated Branches: refs/heads/trunk 3889ddfca -> f92da65f7 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/trunk Commit: f92da65f7d643d40e7cde0113b1f34c608fb7827 Parents: 3889ddf Author: ababiichuk Authored: Mon Oct 2 11:02:18 2017 +0300 Committer: ababiichuk 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 } };