React-React static v7.6.0: ⚛️ A progressive static site generator for React.

Latest Release: v7.6.0


  • Add react-static-plugin-svgr (#1626)
  • Add image import example for TypeScript template (#1597)


  • Update emotion plugin to support 11 version (#1558)
  • Show warning for missing template default export (#1599)
  • Corrected mismatch between Sitemap documentation and implementation (#1618)
  • Migrate usage of node-sass to Dart Sass (#1621)
  • Add React.Suspense wrapper to router guides. (#1593)


  • Fix publicPath is used for webpack output publicPath instead of assetsPath (#1569)
  • Fix sitemap generation for staging context (#1616)
  • Ensure sitemap generation properly ignores noindex routes (#1620)
Source code(tar.gz)
Source code(zip)

React Static Logo

Travis CI Build Status David Dependancy Status npm package v npm package dm Join the community on Spectrum Github Stars Twitter Follow

You are viewing the docs for v7 of React Static. You can browse all historical versions via Github branches!

React Static

A progressive static-site generator for React.

React-Static is a fast, lightweight, and powerful progressive static site generator based on React and its ecosystem. It resembles the simplicity and developer experience you're used to in tools like Create React App and has been carefully designed for performance, flexibility, and user/developer experience.


  • ⚛️ 100% React (and friends!)
  • ? Blazing fast builds and performance.
  • ? Data Agnostic. Supply your site with data from anywhere, however you want!
  • ✂️ Automatic code and data splitting!
  • ? Instant navigation and page views
  • ☔️ Progressively Enhanced and mobile-ready
  • ? SEO Friendly.
  • ? React-centric developer experience.
  • ? Painless project setup & migration.
  • ? Supports 100% of the React ecosystem. Including CSS-in-JS libraries, custom Query layers like GraphQL, and even Redux.
  • ? Hot Reloadable out-of-the-box. Edit React components, styles and even data in real-time.

Sites Built with React-Static

See a list of sites

Quick Start

  • Install the CLI tool:
$ npm i -g react-static
# or
$ yarn global add react-static
  • Start a new project!
$ react-static create
  • Need some help?
$ react-static --help


Migration from a previous version?

The CHANGELOG contains information on breaking change for each major version. The latest breaking changes along with their migration tips are located here

What is a progressive static site?

A progressive static site is a website where every statically exported HTML page is an entry point to a fully-featured automatically-code-split React application. Just like a normal static site, static progressive websites are capable of loading initial landing pages very quickly, but then extend the user experience by transforming invisibly into a single-page React application.

Once a progressive static site page has loaded its React application it can then do amazing things!

  • Prefetch page assets
  • Instantly navigate between pages
  • Provide interactivity not possible in normal static sites
  • Subscribe to and display real-time and dynamic data
  • Anything you can imagine within a React application!

How does it work?

Flow Chart

React Static gathers your data, and templates together and intelligently splits them into bite-size static files using webpack and javascript. Once these files have been generated, React Static uses them to render and export a list of routes that you provide it into HTML files! After your site has been exported, the resulting data, template, and html files can be transfered to a static file server and browsed as an awesomely fast and performant static website!

But remember, a progressive static site is more than that...

Little did you know that when React Static exported your site, it also generated a tiny, optimized, and code-split version of your original React application for every page of your site! After these pages have loaded, React invisibly mounts this application to the existing HTML on the page and... ? ? ? You are now using the single page React application you originally built! This application is special, though! While you browse your website, pages that you might go to next are automatically preloaded, making navigation to them instantaneous!.

That's just the beginning! With React Static, you can unleash your creativity and build anything you can imagine with speed and productivity. It even has awesome plugins that will help you on your journey!

Coming from Create React App?

React Static is also a great replacement for the ever popular Create React App CLI. It provides a similar developer experience, zero-config environment, and features, but without boxing you in. If you ever need to customize your build system in React Static, there is no need to eject! You can use existing plugins or write your own to customize anything you'd like about the build system. Not building a static site? No worries there, React Static works as an SPA too, even if there is only a single index.html file.

Articles, Videos & Tutorials

Support, Community & Chat

Need some help? Have a quick question? Click here to sign up for the React-Tools spectrum community! We are constantly answering questions, discussing features and helping each other out!

Contributing, Issues & Bugs

We are always looking for people to help us grow react-static's capabilities and examples. If you have found a bug, or have a feature request let us know!


React Static uses the MIT license. For more information on this license, click here.


  • [Bug] Build fails for basic template
    [Bug] Build fails for basic template

    Nov 26, 2021

    Buggy out of the box when using the template 'basic'. First, react-hot-loader was missing. Then, when I tried to build, I get this error:

    ERROR in /var/www/react-static/artifacts/react-static-templates.js
    Module build failed (from /usr/local/share/.config/yarn/global/node_modules/babel-loader/lib/index.js):
    TypeError: /var/www/react-static/artifacts/react-static-templates.js: Property value expected type of string but got null
        at Object.validate (/usr/local/share/.config/yarn/global/node_modules/@babel/types/lib/definitions/utils.js:160:13)
        at validateField (/usr/local/share/.config/yarn/global/node_modules/@babel/types/lib/validators/validate.js:24:9)
        at validate (/usr/local/share/.config/yarn/global/node_modules/@babel/types/lib/validators/validate.js:17:3)
        at builder (/usr/local/share/.config/yarn/global/node_modules/@babel/types/lib/builders/builder.js:38:27)
        at Object.StringLiteral (/usr/local/share/.config/yarn/global/node_modules/@babel/types/lib/builders/generated/index.js:350:31)
        at idOption (/var/www/react-static/node_modules/babel-plugin-universal-import/index.js:134:49)
        at PluginPass.Import (/var/www/react-static/node_modules/babel-plugin-universal-import/index.js:241:13)
        at newFn (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/visitors.js:179:21)
        at NodePath._call (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:55:20)
        at (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:42:17)
        at NodePath.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:90:31)
        at TraversalContext.visitQueue (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:112:16)
        at TraversalContext.visitSingle (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:84:19)
        at TraversalContext.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:140:19)
        at Function.traverse.node (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/index.js:84:17)
        at NodePath.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:97:18)
        at TraversalContext.visitQueue (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:112:16)
        at TraversalContext.visitMultiple (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:79:17)
        at TraversalContext.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:138:19)
        at Function.traverse.node (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/index.js:84:17)
        at NodePath.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:97:18)
        at TraversalContext.visitQueue (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:112:16)
        at TraversalContext.visitSingle (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:84:19)
        at TraversalContext.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:140:19)
        at Function.traverse.node (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/index.js:84:17)
        at NodePath.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:97:18)
        at TraversalContext.visitQueue (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:112:16)
        at TraversalContext.visitMultiple (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:79:17)
        at TraversalContext.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:138:19)
        at Function.traverse.node (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/index.js:84:17)
        at NodePath.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:97:18)
        at TraversalContext.visitQueue (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:112:16)
        at TraversalContext.visitMultiple (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:79:17)
        at TraversalContext.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:138:19)
        at Function.traverse.node (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/index.js:84:17)
        at NodePath.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/path/context.js:97:18)
        at TraversalContext.visitQueue (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:112:16)
        at TraversalContext.visitSingle (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:84:19)
        at TraversalContext.visit (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/context.js:140:19)
        at Function.traverse.node (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/index.js:84:17)
        at traverse (/usr/local/share/.config/yarn/global/node_modules/@babel/traverse/lib/index.js:66:12)
        at transformFile (/usr/local/share/.config/yarn/global/node_modules/@babel/core/lib/transformation/index.js:107:29)
        at (<anonymous>)
        at run (/usr/local/share/.config/yarn/global/node_modules/@babel/core/lib/transformation/index.js:35:12)
        at (<anonymous>)
        at Function.transform (/usr/local/share/.config/yarn/global/node_modules/@babel/core/lib/transform.js:27:41)
        at (<anonymous>)
        at step (/usr/local/share/.config/yarn/global/node_modules/gensync/index.js:254:32)
        at /usr/local/share/.config/yarn/global/node_modules/gensync/index.js:266:13
        at (/usr/local/share/.config/yarn/global/node_modules/gensync/index.js:216:11)
     @ ../lib/bootstrapTemplates.js 7:16-64
     @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
                    => There were ERRORS during the node build stage! :(
                    => Fix them and try again!
    bug :bug: 
  • [Bug] basePath unable to use
    [Bug] basePath unable to use

    Dec 11, 2021

    I have done a react-static (7.6.2) web page that works under root path (that is /) and everything works as expected. Last thing that I needed to do is to make application start from a folder /dir1/dir2. From documentation is look quite simple just to change/set configuration property basePath.

    Unfortunately this didn't make it. I spend few hours checking documentation, source code, issues and I'm unable to make this work.

    What I need is to change application to work from / to /dir1/dir2. When I change basePath then a lot of is working as expected:

    • head link css/js are from required path,
    • useBasepath() return valid string,
    • router works. But when I try to (hover a link, click on it) go to subpage it ends with error:
    main.7ec4ee31.js:1 GET http://localhost/templates/__react_static_root__/src/pages/takie-same.9ae1d448.js net::ERR_ABORTED 404 (Not Found)
    main.7ec4ee31.js:1 Uncaught (in promise) ChunkLoadError: Loading chunk 30 failed.

    It tries to load templates from root directory and not from basePath+'/templates'

    I tried to change:

    • siteRoot - doesn't change requests for templates at root,
    • assetsPath - something starts to work, but routes are invalid; when used with basePath some values are /dir1/dir2/dir1/dir2,
    • publicPath but I was unable to make it work as expected.

    No sure what is the problem and how to make it work.

    bug :bug: 
  • [Bug] Sitemap is generated with template path instead of actual path
    [Bug] Sitemap is generated with template path instead of actual path

    Dec 16, 2021

    Sitemap is generated with template path instead of actual path. Is there any way to hide template path in sitemap.xml?

    Here is the example: { path: '/types-of-local-resources/', template: './src/pages/resourceSection.tsx', getData: () => ({ resourceSection: typesofLocalResources, }), },


    bug :bug: 
  • [Bug] React-static renders a blank route for split-second after page load
    [Bug] React-static renders a blank route for split-second after page load

    Dec 27, 2021


    After a static route is hydrated with react-static, anything components rendered as a route within the default @reach/router flashes briefly


        OS: Windows 10 10.0.19044
        CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
        Memory: 17.74 GB / 31.86 GB
        Node: 16.4.0 - C:\Program Files\nodejs\node.EXE
        Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
        npm: 7.18.1 - C:\Program Files\nodejs\npm.CMD
        Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.62)
        Internet Explorer: 11.0.19041.1202
        react: ^16.14.0 => 16.14.0
        react-dom: ^16.14.0 => 16.14.0
        react-hot-loader: ^4.13.0 => 4.13.0
        react-static: ^7.5.1 => 7.6.2
        react-static-plugin-reach-router: ^7.5.1 => 7.6.2
        react-static-plugin-sitemap: ^7.5.1 => 7.6.2
        react-static-plugin-source-filesystem: ^7.5.1 => 7.6.2

    Steps to Reproduce the problem

    Base your steps off of any freshly installed react-static template!

    1. Create a "basic" react-static site from template
    2. Build the site and serve the built assets
    3. Load the page (Throttling helps make the issue more apparant)

    Expected Behavior

    React-static hydrates the page and does not render a blank route for a split-second

    Reproducible Demo

    live link here Repo link here

    bug :bug: 
  • [Bug] long time for
    [Bug] long time for "Bundle updating"

    Jan 4, 2022

    yarn run v1.22.15 $ react-static start Starting Development Server... Browserslist: caniuse-lite is outdated. Please run: npx [email protected] --update-db

    Why you should do it regularly: Fetching Site Data... [✓] Site Data Downloaded Building Routes... { has404: true } [✓] Routes Built Building Templates... [✓] Templates Built Bundling Application... Fetching Site Data... [✓] Site Data Downloaded Running plugins... Browserslist: caniuse-lite is outdated. Please run: npx [email protected] --update-db

    Why you should do it regularly: [✓] Application Bundled (35.2s) [✓] App serving at File changed: \src\pages\Invest_step4.js Updating bundle... [✓] Bundle Updated (21.4s)

    it is taking 35 seconds for yarn start and it is taking 21 seconds for bundle updating when changing some code and saving. hope someone help me I am working with this repo :

    bug :bug: 
  • [Bug] Build fails due to
    [Bug] Build fails due to "babel-plugin-universal-import/universalImport" MODULE_NOT_FOUND

    Jan 12, 2022


    I have yarn workspaces project. During react-static build I get following errors:

    ERROR in */workspaces/xxx/artifacts/react-static-templates.js
    Module not found: Error: Can't resolve 'babel-plugin-universal-import/universalImport' in '*/workspaces/xxx/artifacts'
     @ */workspaces/xxx/artifacts/react-static-templates.js 2:0-78 4:0-78 6:0-78 8:0-78 10:0-78 12:0-77 26:20-36 46:20-37 66:20-37 86:20-37 106:20-37 126:20-37
     @ ../lib/bootstrapTemplates.js
     @ multi ../lib/bootstrapPlugins.js ../lib/bootstrapTemplates.js ../lib/bootstrapApp.js
                    => There were ERRORS during the node build stage! :(
                    => Fix them and try again!
    Trace: {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
    Error: Cannot find module '*/workspaces/xxx/artifacts/static-app.js'
    Require stack:
    - */node_modules/react-static/lib/static/exportRoutes.threaded.js
    - loader.js:902 Function.Module._resolveFilename

    react-static depends on babel-plugin-universal-import and it is resolved to [email protected].


    When I go to workspace containing react-static project and do yarn install babel-plugin-universal-import (resolves to [email protected]) - build works fine.


    # npx envinfo --system --npmPackages react* --binaries --npmGlobalPackages react* --browsers
    zsh: no matches found: react*        # ran both in root workspace and in `react static` workspace - same reuslt
    # npx envinfo --system
      OS: macOS 11.6
      CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
      Memory: 2.47 GB / 16.00 GB
      Shell: 5.8 - /bin/zsh
    # yarn -v
    # node -v
    # yarn.lock react-static resolution
    [email protected]^7.6.2:
      version "7.6.2"
      resolved ""
      integrity sha512-JQACM+3GgF1vkUH6E6w1k0Qut6IbcfXjU37shGUWM9tIs3F9e/33saXK4G/uSl1kc8qjI+RekAQs/qyjMlUKlg==
        "@babel/cli" "^7.5.5"
        "@babel/core" "^7.5.5"
        "@babel/plugin-proposal-class-properties" "^7.5.5"
        "@babel/plugin-proposal-export-default-from" "^7.5.2"
        "@babel/plugin-proposal-optional-chaining" "^7.2.0"
        "@babel/plugin-syntax-dynamic-import" "^7.2.0"
        "@babel/plugin-transform-destructuring" "^7.5.0"
        "@babel/plugin-transform-modules-commonjs" "^7.5.0"
        "@babel/plugin-transform-runtime" "^7.5.5"
        "@babel/preset-env" "^7.5.5"
        "@babel/preset-react" "^7.0.0"
        "@babel/preset-stage-0" "^7.0.0"
        "@babel/register" "^7.5.5"
        "@babel/runtime" "^7.5.5"
        "@reach/router" "^1.3.1"
        autoprefixer "^9.7.4"
        axios "^0.21.1"
        babel-core "7.0.0-bridge.0"
        babel-loader "^8.0.6"
        babel-plugin-macros "^2.6.1"
        babel-plugin-transform-react-remove-prop-types "^0.4.24"
        babel-plugin-universal-import "^4.0.0"
        case-sensitive-paths-webpack-plugin "^2.2.0"
        chalk "^2.4.2"
        chokidar "^3.0.2"
        circular-dependency-plugin "^5.2.0"
        cors "^2.8.5"
        css-loader "^2.1.1"
        download-git-repo "^2.0.0"
        extract-css-chunks-webpack-plugin "^4.6.0"
        file-loader "3.0.1"
        fs-extra "^7.0.1"
        git-promise "^1.0.0"
        glob "^7.1.4"
        gunzip-maybe "^1.4.1"
        html-webpack-plugin "^3.2.0"
        inquirer "^6.5.1"
        inquirer-autocomplete-prompt "^1.0.1"
        intersection-observer "^0.7.0"
        jsesc "^2.5.2"
        match-sorter "^3.1.1"
        minimist "^1.2.0"
        mutation-observer "^1.0.3"
        optimize-css-assets-webpack-plugin "^5.0.3"
        portfinder "^1.0.21"
        postcss-flexbugs-fixes "^4.1.0"
        postcss-loader "^3.0.0"
        pretty-error "^2.1.1"
        progress "^2.0.3"
        prop-types "^15.7.2"
        raf "^3.4.1"
        raw-loader "^3.1.0"
        react-helmet "^6.1.0"
        react-universal-component "^4.0.0"
        resolve-from "^5.0.0"
        serve "^11.1.0"
        shorthash "^0.0.2"
        slash "^2.0.0" "^2.2.0" "^2.2.0"
        style-loader "0.23.1"
        swimmer "^1.4.0"
        tar-fs "^2.0.0"
        terser-webpack-plugin "^1.4.1"
        upath "^1.1.2"
        url-loader "^2.1.0"
        webpack "^4.39.2"
        webpack-bundle-analyzer "^3.4.1"
        webpack-dev-server "^3.8.0"
        webpack-flush-chunks "^2.0.3"
        webpack-node-externals "^1.7.2"
    bug :bug: 
  • Make resolution cross-env in filesystem plugin and base package
    Make resolution cross-env in filesystem plugin and base package

    Apr 15, 2019

    • Makes sure it's relative to the location root, not site root
    • Makes sure it's resolving paths, indepedent of file system
    • Makes sure it starts with a slash in case there is no directory structure


    Changes the resolution in react-static-plugin-source-filesystem to be cross-env compatible.

    • Stop using hardcoded path separators. These are not the same across environments.
    • Use path.relative for relative resolution instead of replace. This normalises paths first, so it works across environments.
    • Cutoff the extension using path.basename and path.extname, which works across environments.
    • Prefix with a slash if necessary (top-level pages)
    • Change the comment to be correct: make relative to location root, not site root.

    This works with path.resolve(...) and ./src/pages.

    Changes the resolution in react-static to be cross-env compatible.

    • Throw an error if a plugin resolves a windows path (it expects POSIX paths by then)
    • Use join whenever dealing with real paths
    • Add tests for the behaviour above

    Additionally, changes the to use cross-env resolution for the paths that are considered external.


    • [X] Changed code

    Motivation and Context

    Fixes #1094 Fixes #1122 Fixes #1123

    Screenshots (if appropriate):

    Types of changes

    • [ ] Refactoring/add tests (refactoring or adding test which isn't a fix or add a feature)
    • [X] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)


    • [ ] I have updated the documentation accordingly
    • [X] I have updated the CHANGELOG with a summary of my changes
    • [X] My changes have tests around them
  • Add babel-preset-stage-3 to solve the module not found errors
    Add babel-preset-stage-3 to solve the module not found errors

    Oct 11, 2017

    Since this repo relies on Node >=v7.6, adding "babel-preset-stage-3": "^6.24.1", to package.json and "stage-3" to .babelrc, should solve this. I'd be happy to make this change in Pull Request. Do I need access rights to the repo for that?

    bug :bug: 
  • yarn build and the project contains the entire source code
    yarn build and the project contains the entire source code

    Mar 11, 2019

    I came across this accidently. In the past I was used to have an obfuscated version of my SPA after "npm run build".

    With the latest react-static (which does not work correctly with npm run build, but it passes with yarn build, see here there is the full source code available in user's browser. In the beginning I thought, this is just because there is somewhere a file link to the source code in a map or so and it would be only visible to me, but after deploying it to a webserver it was also available to all.

    Steps to reproduce:

    • react-static create
    • use "blank" target
    • To visualize the issue add a console.log("Hello World") in App.js, but you could also browse the source tree in developer console
    render () {
        console.log("Hello World")
        return (
    • run yarn build
    • run `yarn serve``
    • open localhost:3000 in your browser
    • open developer console
    • find Hello World and click the right most link to 'App.js:9'

    Find your sources. Bummer

    I never had this with previous react-static versions.

  • Maintainers and Contributors
    Maintainers and Contributors

    Sep 5, 2018

    I know that this is a free, open-source project and I appreciate all the time and effort this has been put into by you and the collaborators. Currently react-static v16 is in beta and there is still errors that I constantly fight with (using react-static in production), some of them already fixed in PRs and while it kinda works, I find myself to work with ugly workarounds like patching react-static files by overwriting them inside the node_modules folder.

    Maybe it could help to call for maintainers with publish and PR merge rights? I believe that react-static is a great solution for statical page building and there is people commiting and participating in the development, adding maintainers could help getting to v16 and future updates a lot faster.

    good first issue stale 
  • Example: Firebase - Module not found: Can't resolve './firebase
    Example: Firebase - Module not found: Can't resolve './firebase

    Mar 18, 2018

    Usin the latest react-static to build with react-create command with Select a template below... firebase-auth. after npm run start this is what I got... screen shot 2018-03-18 at 3 06 29 pm

    bug :bug: good first issue stale 
  • CSS Modules no longer work
    CSS Modules no longer work

    May 7, 2018

    As far as I can tell, #574 may have broken the usage of CSS Modules in React-Static. I’ve upgraded to the latest version and noticed that import styles from 'Foo.scss' no longer works as expected. If you attempt to reference a class name on the styles object, it results in undefined.


    1. react-static -v: 5.8.2 (first non-working release, last working release is 5.8.1)
    2. node -v: 8.9.3
    3. yarn --version or npm -v: 5.6.0
    4. Operating system: macOS 10.13.4

    Steps to Reproduce the problem

    1. Go to examples/sass
    2. npm i
    3. npm i [email protected] (first non-working release)
    4. Open static.config.js and add modules: true option on css-loader
    5. Open App.js and replace import './app.scss' with import styles from './app.scss'
    6. Add console.log(styles.content) below the app.scss import
    7. Run npm stage
    8. Notice that the console.log call results in undefined

    Expected Behavior

    If you did the steps outlined above on 5.8.1, it would work. You’d just need to remove the if condition surrounding ExtractTextPlugin.extract call in static.config.js (which was introduced to conform to changes in #574).

    Let me know if I’m missing some trivial configuration that would allow me to use CSS Modules. Otherwise, changes in #574 need to be revisited.

    /cc @lottamus

    needs-info ⚠