From ed067e8d3561bb2548ec31908f25ca1191e464d5 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 7 May 2018 17:02:55 +0200 Subject: [PATCH] Fix CSS asset loading for yarn start (HMR) (#11855) * enable url() processing in CSS to ensure assets load in HMR mode * only needed when running `yarn start` which needs this for the hot reloader --- scripts/webpack/webpack.common.js | 1 + scripts/webpack/webpack.dev.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/webpack/webpack.common.js b/scripts/webpack/webpack.common.js index 01ef1bc56d3..f32ee267a1a 100644 --- a/scripts/webpack/webpack.common.js +++ b/scripts/webpack/webpack.common.js @@ -12,6 +12,7 @@ module.exports = { output: { path: path.resolve(__dirname, '../../public/build'), filename: '[name].[hash].js', + // Keep publicPath relative for host.com/grafana/ deployments publicPath: "public/build/", }, resolve: { diff --git a/scripts/webpack/webpack.dev.js b/scripts/webpack/webpack.dev.js index a2c60cf15c4..cc0751fc7d9 100644 --- a/scripts/webpack/webpack.dev.js +++ b/scripts/webpack/webpack.dev.js @@ -85,7 +85,7 @@ module.exports = merge(common, { ] }, require('./sass.rule.js')({ - sourceMap: true, minimize: false, preserveUrl: false + sourceMap: true, minimize: false, preserveUrl: HOT }, extractSass), { test: /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/,