Styleguidist breaks with showing es6 or typescript files as not parsable and breaks. I have no file in my broken yet, just webpack, babel, styleguidist and bare minimum config for styleguidist.
> styleguidist-broken@1.0.0 build
> styleguidist build
Building style guide...
FAIL Failed to compile
node_modules/markdown-to-jsx/index.js from Terser plugin
Unexpected token: operator (<) [node_modules/markdown-to-jsx/index.js:779,21]
node_modules/tiny-warning/src/index.js from Terser plugin
Missing initializer in const declaration [node_modules/tiny-warning/src/index.js:2,18]
node_modules/@babel/helpers/scripts/generate-regenerator-runtime.js from Terser plugin
Unexpected token: name (Promise) [node_modules/@babel/helpers/scripts/generate-regenerator-runtime.js:6,32]
node_modules/@babel/plugin-proposal-private-property-in-object/lib/index.js from Terser plugin
'return' outside of function [node_modules/@babel/plugin-proposal-private-property-in-object/lib/index.js:25,2]
node_modules/@webassemblyjs/helper-numbers/src/index.js from Terser plugin
Unexpected token punc «:», expected punc «,» [node_modules/@webassemblyjs/helper-numbers/src/index.js:7,37]
node_modules/@webassemblyjs/ieee754/src/index.js from Terser plugin
Unexpected token punc «:», expected punc «,» [node_modules/@webassemblyjs/ieee754/src/index.js:21,27]
node_modules/has-symbols/test/shams/core-js.js from Terser plugin
'return' outside of function [node_modules/has-symbols/test/shams/core-js.js:11,1]
node_modules/has-symbols/test/shams/get-own-property-symbols.js from Terser plugin
'return' outside of function [node_modules/has-symbols/test/shams/get-own-property-symbols.js:11,1]
node_modules/jss/src/flow-types/cssom.js from Terser plugin
Unexpected token: name (StylePropertyMap) [node_modules/jss/src/flow-types/cssom.js:5,17]
node_modules/jss/src/flow-types/dom.js from Terser plugin
Unexpected token: name (DOMString) [node_modules/jss/src/flow-types/dom.js:5,12]
node_modules/jss/src/flow-types/jss.js from Terser plugin
Unexpected token name «Jss», expected name «from» [node_modules/jss/src/flow-types/jss.js:2,12]
node_modules/istanbul-reports/lib/html-spa/src/fileBreadcrumbs.js from Terser plugin
Unexpected token: operator (<) [node_modules/istanbul-reports/lib/html-spa/src/fileBreadcrumbs.js:20,12]
node_modules/istanbul-reports/lib/html-spa/src/flattenToggle.js from Terser plugin
Unexpected token: operator (<) [node_modules/istanbul-reports/lib/html-spa/src/flattenToggle.js:5,8]
node_modules/istanbul-reports/lib/html-spa/src/filterToggle.js from Terser plugin
Unexpected token: operator (<) [node_modules/istanbul-reports/lib/html-spa/src/filterToggle.js:5,8]
node_modules/istanbul-reports/lib/html-spa/src/index.js from Terser plugin
Unexpected token: operator (<) [node_modules/istanbul-reports/lib/html-spa/src/index.js:93,8]
node_modules/istanbul-reports/lib/html-spa/src/summaryHeader.js from Terser plugin
Unexpected token: operator (<) [node_modules/istanbul-reports/lib/html-spa/src/summaryHeader.js:26,8]
node_modules/istanbul-reports/lib/html-spa/src/summaryTableHeader.js from Terser plugin
Unexpected token: operator (<) [node_modules/istanbul-reports/lib/html-spa/src/summaryTableHeader.js:27,8]
node_modules/istanbul-reports/lib/html-spa/src/summaryTableLine.js from Terser plugin
Unexpected token: operator (<) [node_modules/istanbul-reports/lib/html-spa/src/summaryTableLine.js:7,8]
It should create, build and generate a minimum style guide based on config.
Current behaviour
Styleguidist breaks with showing es6 or typescript files as not parsable and breaks. I have no file in my broken yet, just webpack, babel, styleguidist and bare minimum config for styleguidist.
To reproduce
Error seen on screen
Expected behavior
It should create, build and generate a minimum style guide based on config.
Notes
I feel this issue could be due to Webpack not being configured properly. It works as expected when we do
npm run starti.e. server. But fails on the building part.