From 2623fa4b4f1f257f0eba0291226becbd2266706b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfonso=20Mu=C3=B1oz-Pomer?= Date: Thu, 7 Jun 2018 13:16:09 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20hard-code=20publicPath=20Otherw?= =?UTF-8?q?ise=20we=20can=E2=80=99t=20build=20as=20instructed=20in=20the?= =?UTF-8?q?=20README=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webpack.config.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index ae763d4..2a56b58 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,8 +15,6 @@ module.exports = { output: { library: `[name]`, filename: `[name].bundle.js`, - // Must match module.exports.serve.dev.publicPath or the demo page will show broken images - publicPath: `/dist/` }, optimization: { @@ -44,6 +42,19 @@ module.exports = { module: { rules: [ + { + test: /\.css$/, + use: [ + `style-loader`, + { + loader: 'css-loader', + options: { + modules: true, + localIdentName: '[name]__[local]___[hash:base64:5]' + } + } + ] + }, { test: /\.(jpe?g|png|gif)$/i, use: [