Browse Source

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
David 7 years ago
parent
commit
ed067e8d35
2 changed files with 2 additions and 1 deletions
  1. 1 0
      scripts/webpack/webpack.common.js
  2. 1 1
      scripts/webpack/webpack.dev.js

+ 1 - 0
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: {

+ 1 - 1
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=&.]+)?$/,