Skip to content

Commit

Permalink
Add support for static files to react-styleguidist
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Feb 23, 2021
1 parent 0470bbe commit abf98df
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion styleguidist/styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
const path = require('path')

module.exports = {

/**
* Static assets folder. Accessible as / in the style guide dev server.
* @type {string | array}
* @example "/"
* @default undefined
*/
assetsDir: "assetsDir",

/**
* The title that appears at the top of the navigation bar.
* @type {string}
Expand Down Expand Up @@ -119,7 +128,7 @@ module.exports = {
*/
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.js')
return `import ${name} from './components/${name}/';`
return `import ${name} from '../components/${name}/';`
},

/**
Expand Down

0 comments on commit abf98df

Please sign in to comment.