insin / nwb

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION]how to ignore stories.js files from ./src when performing nwb build-react-component

adamchenwei opened this issue · comments

I searched numbers of articles in google and read through their doc(https://github.com/insin/nwb/blob/master/docs/Commands.md#nwb-build) and issues, I can't find anything. but my nwb build brings in .stories.js files into the ./dist directory after built. I store stories.js files alone side my component files in ./src for easier access and update stories.

I can't find any relevant config can somehow ignore the stories.js files in src file so they won't be generated when I run command like following: nwb build-react-component --copy-files --no-demo

Any idea or suggestions?

Maybe, you should be able to write .babelrc

{
  "ignore": [
    "**/*.stories.js"
  ]
}