DEV Community

Discussion on: Using Storybook with Vue single file components

Collapse
 
lopis profile image
Joao L.

Hey, I realized that you don't need to manually write the path in the <include-source /> at all. Webpack can resolve the file path with this.resourcePath

const fileContent = fs
  .readFileSync(this.resourcePath, 'utf8')
  .replace(/<include-source.*\n/, '');
Collapse
 
josephuspaye profile image
Josephus Paye II

That's pretty good! Would you be able to make a pull request to the tutorial example? github.com/JosephusPaye/vue-storyb...