[Fresh] react-fresh => react-refresh (#15888)

This commit is contained in:
Dan Abramov
2019-06-15 19:36:46 +01:00
committed by GitHub
parent 801feed95c
commit f0156766dc
15 changed files with 22 additions and 23 deletions

View File

@@ -1,7 +0,0 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-fresh-babel.production.min.js');
} else {
module.exports = require('./cjs/react-fresh-babel.development.js');
}

View File

@@ -1,7 +0,0 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-fresh-runtime.production.min.js');
} else {
module.exports = require('./cjs/react-fresh-runtime.development.js');
}

View File

@@ -1,4 +1,4 @@
# react-fresh
# react-refresh
This is an experimental package for hot reloading.

7
packages/react-refresh/npm/babel.js vendored Normal file
View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-refresh-babel.production.min.js');
} else {
module.exports = require('./cjs/react-refresh-babel.development.js');
}

7
packages/react-refresh/npm/runtime.js vendored Normal file
View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-refresh-runtime.production.min.js');
} else {
module.exports = require('./cjs/react-refresh-runtime.development.js');
}

View File

@@ -1,6 +1,5 @@
{
"name": "react-fresh",
"private": true,
"name": "react-refresh",
"description": "React is a JavaScript library for building user interfaces.",
"keywords": [
"react"

View File

@@ -39,7 +39,7 @@ describe('ReactFresh', () => {
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactFreshRuntime = require('react-fresh/runtime');
ReactFreshRuntime = require('react-refresh/runtime');
Scheduler = require('scheduler');
act = require('react-dom/test-utils').act;
container = document.createElement('div');

View File

@@ -9,7 +9,7 @@
let babel = require('babel-core');
let {wrap} = require('jest-snapshot-serializer-raw');
let freshPlugin = require('react-fresh/babel');
let freshPlugin = require('react-refresh/babel');
function transform(input, options = {}) {
return wrap(

View File

@@ -17,7 +17,7 @@ let ReactFreshRuntime;
let act;
let babel = require('babel-core');
let freshPlugin = require('react-fresh/babel');
let freshPlugin = require('react-refresh/babel');
describe('ReactFreshIntegration', () => {
let container;
@@ -39,7 +39,7 @@ describe('ReactFreshIntegration', () => {
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactFreshRuntime = require('react-fresh/runtime');
ReactFreshRuntime = require('react-refresh/runtime');
act = require('react-dom/test-utils').act;
container = document.createElement('div');
document.body.appendChild(container);

View File

@@ -410,14 +410,14 @@ const bundles = [
{
bundleTypes: [NODE_DEV, NODE_PROD],
moduleType: ISOMORPHIC,
entry: 'react-fresh/babel',
entry: 'react-refresh/babel',
global: 'ReactFreshBabelPlugin',
externals: [],
},
{
bundleTypes: [NODE_DEV, NODE_PROD],
moduleType: ISOMORPHIC,
entry: 'react-fresh/runtime',
entry: 'react-refresh/runtime',
global: 'ReactFreshRuntime',
externals: [],
},