Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
@phenomic/plugin-bundler-webpack: react-helmet renderStatic() n…
Browse files Browse the repository at this point in the history
…ow works as expected

Closes #1167
  • Loading branch information
MoOx committed Sep 26, 2017
1 parent b126dc9 commit f9ce59c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions examples/react-app-getting-started/__tests__/index.js
@@ -1,4 +1,7 @@
/* eslint-disable import/no-extraneous-dependencies */
import path from "path";
import fs from "fs";

import globby from "globby";

it("should build example correctly", () => {
Expand Down Expand Up @@ -34,4 +37,11 @@ it("should build example correctly", () => {
!assetsBundlerFiles.includes(file)
)
).toMatchSnapshot();

const file1 = fs.readFileSync(
path.join(__dirname, "..", "dist", "index.html"),
{ encoding: "utf8" }
);
expect(file1).toContain("Fifth post");
expect(file1).toContain('<title data-react-helmet="true">Hello world');
});
6 changes: 5 additions & 1 deletion packages/plugin-bundler-webpack/src/index.js
Expand Up @@ -31,6 +31,8 @@ const defaultExternals = [
// to not bundle all deps in the static build (for perf)
// the problem is that if people rely on node_modules for stuff
// like css, this breaks their build.
//
// @todo find a better way than a whitelist

// Glamor integration
"glamor",
Expand All @@ -40,7 +42,9 @@ const defaultExternals = [
"aphrodite",
"aphrodite/no-important",

"react-native-web"
"react-native-web",

"react-helmet"
];

const getWebpackConfig = (config: PhenomicConfig) => {
Expand Down

0 comments on commit f9ce59c

Please sign in to comment.