diff --git a/fixtures/dom/.gitignore b/fixtures/dom/.gitignore index bffad9e24b6d..9f05c1cc2b73 100644 --- a/fixtures/dom/.gitignore +++ b/fixtures/dom/.gitignore @@ -9,8 +9,11 @@ coverage # production build public/react.development.js +public/react.production.min.js public/react-dom.development.js +public/react-dom.production.min.js public/react-dom-server.browser.development.js +public/react-dom-server.browser.production.min.js # misc .DS_Store diff --git a/fixtures/dom/package.json b/fixtures/dom/package.json index 0f2959684a65..90cb22479c12 100644 --- a/fixtures/dom/package.json +++ b/fixtures/dom/package.json @@ -18,7 +18,7 @@ }, "scripts": { "start": "react-scripts start", - "prestart": "cp ../../build/dist/react.development.js ../../build/dist/react-dom.development.js ../../build/dist/react-dom-server.browser.development.js public/", + "prestart": "cp ../../build/dist/react.development.js ../../build/dist/react-dom.development.js ../../build/dist/react.production.min.js ../../build/dist/react-dom.production.min.js ../../build/dist/react-dom-server.browser.development.js ../../build/dist/react-dom-server.browser.production.min.js public/", "build": "react-scripts build && cp build/index.html build/200.html", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" diff --git a/fixtures/dom/src/components/Header.js b/fixtures/dom/src/components/Header.js index e4b743ea92c1..8fc03246e84e 100644 --- a/fixtures/dom/src/components/Header.js +++ b/fixtures/dom/src/components/Header.js @@ -7,8 +7,9 @@ class Header extends React.Component { super(props, context); const query = parse(window.location.search); const version = query.version || 'local'; + const production = query.production || false; const versions = [version]; - this.state = {version, versions}; + this.state = {version, versions, production}; } componentWillMount() { getVersionTags().then(tags => { @@ -25,6 +26,14 @@ class Header extends React.Component { } window.location.search = stringify(query); } + handleProductionChange(event) { + const query = parse(window.location.search); + query.production = event.target.checked; + if (!query.production) { + delete query.production; + } + window.location.search = stringify(query); + } handleFixtureChange(event) { window.location.pathname = event.target.value; } @@ -43,6 +52,16 @@ class Header extends React.Component {
+ +