From 52d9a14fc895720fffb0d61e236f22bcb44e64cb Mon Sep 17 00:00:00 2001 From: Kher Phay Chang Date: Tue, 2 Mar 2021 18:22:54 +0800 Subject: [PATCH] fix(main): update main path --- docs/gatsby-config.js | 3 +++ docs/package.json | 2 +- package.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index aaffdd5bc..944f3497c 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -1,4 +1,7 @@ +const pkg = require("../package.json"); + module.exports = { + pathPrefix: pkg.config.base, siteMetadata: { title: "react-comps", siteUrl: "https://sebgroup.github.io/react-components/", diff --git a/docs/package.json b/docs/package.json index 3be449712..16b9e8aeb 100644 --- a/docs/package.json +++ b/docs/package.json @@ -8,7 +8,7 @@ ], "scripts": { "start": "gatsby develop -p 3000", - "build": "gatsby build", + "build": "gatsby build --prefix-paths", "serve": "gatsby serve", "clean": "gatsby clean" }, diff --git a/package.json b/package.json index 2c23762f9..cb2a80de0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0-semantically-released", "description": "A set of React components based on SEB design library guidelines for mobile and web React applications", "license": "Apache-2.0", - "main": "./cjs/index.js", + "main": "./index.js", "module": "./esm/index.js", "exports": { "./": { @@ -80,6 +80,7 @@ "semantic-release": "^17.3.9" }, "config": { + "base": "/react-components", "commitizen": { "path": "./node_modules/cz-conventional-changelog" }