Skip to content
Permalink
Branch: master
Commits on Aug 16, 2019
  1. Add "Weekly Best of JavaScript" site to README.md (#1284)

    michaelrambeau authored and SleeplessByte committed Aug 16, 2019
Commits on Aug 13, 2019
  1. Bump react-hot-loader to 4.12.10 (#1274)

    emuraton authored and SleeplessByte committed Aug 13, 2019
    * bump react-hot-loader to 4.12.10
  2. fix broken link in docs/plugins/README.md (#1280)

    miiton authored and SleeplessByte committed Aug 13, 2019
Commits on Aug 12, 2019
  1. Update CHANGELOG.md

    SleeplessByte committed Aug 12, 2019
  2. Handle relative route template (#1276)

    nddery authored and SleeplessByte committed Aug 12, 2019
    * Add tests around extractTemplates 404 handling
    
    * Resolves relative route.template against ROOT
    
    This ensure that given a relative `route.template`, extractTemplates
    behavior remains intact while also supporting absolute `route.template`.
    
    See
    #1253 (comment)
    for details
    
    * Update documentation for route.template
Commits on Aug 8, 2019
  1. Ensure publicPath is always absolute (#1272)

    nddery authored and SleeplessByte committed Aug 8, 2019
    * Ensure publicPath is always absolute
    
    (publicPath or REACT_STATIC_PUBLIC_PATH)
    
    Per https://github.com/react-static/react-static/pull/1196/files#r290831191
    
    * Webpack publicPath should not be ASSET_PATH
    
    Per #1196
    
    * Add test around publicPath
    
    * getRoutePath to strip baseBath entirely
    
    * Update production mock
Commits on Jul 19, 2019
  1. Update CHANGELOG.md

    SleeplessByte committed Jul 19, 2019
  2. Don't use path.relative() in react-static/src/static (#1254)

    jviotti authored and SleeplessByte committed Jul 19, 2019
    I've been lately hitting various issues due to the way react-static
    defaults to relative paths, which tend to break as soon as you tweak
    react-static directories (artifacts, dist, root, etc) to locations that
    are not the ones react-static recommend.
    
    Most of these issues are automatically resolved by switching to
    `path.resolve()`, which always results in absolute paths, and avoids
    large `../../` chains if the second argument is absolute.
  3. Don't use a relative path to resolve Default404 template (#1250)

    jviotti authored and SleeplessByte committed Jul 19, 2019
    * Don't use a relative path to resolve Default404 template
    
    The current approach assumes that the current directory when running
    `react-static` is the root path, which might not be the case if you
    customize the root.
    
    This came up as I'm developing a CLI module that embeds `react-static`,
    takes some command line arguments, spawns `react-static` using files
    inside the CLI module, and stores the results in the user's destination
    directory.
    
    When the tool (and therefore `react-static`) are installed globally, my
    `ROOT` is:
    
    ```
    /Users/jviotti/.nvm/versions/node/v9.11.2/lib/node_modules/<my-cli>
    ```
    
    And `__dirname` from `src/static/getRoutes.js` becomes:
    
    ```
    /Users/jviotti/.nvm/versions/node/v9.11.2/lib/node_modules/<my-cli>/node_modules/react-static/lib/static
    ```
    
    Given those two variables, the code in `getRoutes.js` will evaluate the
    `Default404` template path to:
    
    ```
    node_modules/react-static/lib/browser/components/Default404
    ```
    
    Which is a relative path, therefore `react-static` will try to find
    `Default404` in a local installation of `react-static` in the place the
    user ran the CLI, which is not expected.
    
    Making the path absolute ensures that `react-static` always defaults the
    404 template to the one it itself ships, instead of accidentally cross
    referencing another version of itself.
Commits on Jul 18, 2019
  1. Fix route template path handling (#1253)

    jviotti authored and SleeplessByte committed Jul 18, 2019
    Consider that we store the artifacts on an OS temporary directory (such
    as what you would get with `mktemp -d` or `node-tmp`) which we can
    assume for simplicity purposes to be `/tmp/react-static`.
    
    In the snippet above, `route.template` is a path such as
    `/home/johndoe/site/lib/pages/main.js`. Therefore `path.relative()` will
    calculate the path to `/home/johndoe/site/lib/pages/main.js` from
    `/tmp/react-static`, so the result will be something like
    `../home/johndoe/site/lib/pages/main.js` which makes no sense and will
    cause react-static to fail.
    
    What we really intended is `path.resolve()`, so that the user still gets
    `/home/johndoe/site/lib/pages/main.js`.
  2. Update CHANGELOG.md

    SleeplessByte committed Jul 18, 2019
  3. Update CHANGELOG.md

    SleeplessByte committed Jul 18, 2019
  4. Node 12 (stable) support (#1219)

    nddery authored and SleeplessByte committed Jul 18, 2019
    * Upgrade to node-sass@^4.12.0, add Node 12 support
    
    See sass/node-sass#2632 (comment)
    
    * Ensure to install fsevents 1.2.9 or higher
    
    Some of the packages we rely on (onchange -> chokidar -> fsevents for
    example) rely on fsevents. fsevents prior to 1.2.9 isn't Node 12
    compatible.
    See fsevents/fsevents#272 (comment)
    
    * Remove resolution fields, keep yarn.lock changes
    
    This ensures we install fsevents@1.2.9, without making fsevents a
    required dependency.
    
    See #1219 (comment)
  5. Update CHANGELOG.md

    SleeplessByte committed Jul 18, 2019
  6. Allow plugins to use plugins (#1264)

    Herohtar authored and SleeplessByte committed Jul 18, 2019
    * Add plugins to the list of supported hooks
    * Added plugins hook to exports
Commits on Jul 15, 2019
  1. Update README.md

    tannerlinsley committed Jul 15, 2019
Commits on Jul 9, 2019
  1. Add devAssetsPath and stagingAssetsPath (#1208)

    kalinchuk authored and sw-yx committed Jul 9, 2019
    * Add devAssetsPath and stagingAssetsPath
    
    * Update index.d.ts
  2. Add base path to server location URL (#1218)

    nddery authored and sw-yx committed Jul 9, 2019
  3. Mention react-static-plugin-yandex-metrica in the plugins docs (#1223)

    evgeny-t authored and sw-yx committed Jul 9, 2019
  4. fix(template): TypeScript Template does not Build or Run #1163 (#1255)

    masahitojp authored and sw-yx committed Jul 9, 2019
  5. Update package.json (#1256)

    cortopy authored and sw-yx committed Jul 9, 2019
    missing dependency
Commits on Jul 3, 2019
  1. cssloader: Rename "browsers" to "overrideBrowserslist" (#1251)

    jviotti authored and sw-yx committed Jul 3, 2019
    Running `react-static` currently prints this warning:
    
    ```
    Replace Autoprefixer browsers option to Browserslist config.
    Use browserslist key in package.json or .browserslistrc file.
    
    Using browsers option cause some error. Browserslist config
    can be used for Babel, Autoprefixer, postcss-normalize and other tools.
    
    If you really need to use option, rename it to overrideBrowserslist.
    
    Learn more at:
    https://github.com/browserslist/browserslist#readme
    https://twitter.com/browserslist
    ```
    
    It goes away by renaming `browsers` to `overrideBrowserslist` as
    suggested.
    
    Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
  2. Fix #1177 (#1249)

    Reggino authored and sw-yx committed Jul 3, 2019
    Sass plugin should honor config.extractCssChunks related webpack optimization
Commits on Jul 2, 2019
  1. Fix typo in comment in binHelpers (#1246)

    LucianBuzzo authored and sw-yx committed Jul 2, 2019
Commits on Jun 27, 2019
Commits on Jun 26, 2019
  1. Update README.md

    sw-yx committed Jun 26, 2019
  2. Update README.md

    sw-yx committed Jun 26, 2019
  3. document mdxprovider

    sw-yx committed Jun 26, 2019
Commits on Jun 25, 2019
  1. fix react-static --version command

    sw-yx
    sw-yx committed Jun 25, 2019
  2. fix react-static --version command

    sw-yx
    sw-yx committed Jun 25, 2019
  3. fix react-static --version command

    sw-yx
    sw-yx committed Jun 25, 2019
  4. Mention `useSiteData` hook in the config.md (#1241)

    petetnt authored and sw-yx committed Jun 25, 2019
Commits on Jun 17, 2019
  1. Update README.md (#1230)

    Wavez authored and sw-yx committed Jun 17, 2019
    added source code link for my site (fourthdrive.com) ☺
Older
You can’t perform that action at this time.