From e0351fd5fd4b5ca474e0dd9ad9aef689204f010c Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 26 Jan 2023 11:03:25 +0100 Subject: [PATCH] Add public path config information for HMR Signed-off-by: Louis Chemineau --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d069053..7151280 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,11 @@ __webpack_public_path__ = generateFilePath(appName, '', 'js/') You can then start you dev serve with `npm serve` or `make serve-js` if you added this step in your makefile. -If your nextcloud hostname is different from `localhost`, you need to start the server like so: +- Your Nextcloud server hostname will probably be different than `localhost`. In that case, you will need specify it with `--allowed-hosts`. +- Your public path will probably not be `/apps/{app-name}/js`. In that case, you will need to specify it with `--static-public-path`. ```shell -npm run serve -- --allowed-hosts your-hostname.example +npm run serve -- --allowed-hosts your-hostname.example [other-hostname.example ...] --static-public-path /your/custom/public/path ``` ## Extend with your own configs @@ -67,7 +68,7 @@ module.exports = webpackConfig ### Replace/edit existing rule All the rules are available individually on the `@nextcloud/webpack-vue-config/rules` file. You can import them and use the one you want. -If you want to overrride a rule that is already provided by this package, you can use the following to replace it: +If you want to override a rule that is already provided by this package, you can use the following to replace it: ```js // webpack.config.js