mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fixed fixtures and updated cjs/umd paths
This commit is contained in:
@@ -20,6 +20,6 @@
|
||||
["transform-es2015-destructuring", { "loose": true }],
|
||||
["transform-es2015-block-scoping", { "throwIfClosureRequired": true }],
|
||||
"transform-es3-member-expression-literals",
|
||||
"transform-es3-property-literals",
|
||||
"transform-es3-property-literals"
|
||||
]
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<script src="../../../build/dist/react.dev.js"></script>
|
||||
<script src="../../../build/dist/react-dom.dev.js"></script>
|
||||
<script src="../../../build/dist/react.development.js"></script>
|
||||
<script src="../../../build/dist/react-dom.development.js"></script>
|
||||
<div id="container"></div>
|
||||
<script>
|
||||
ReactDOM.render(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<script src="../../../build/dist/react.prod.min.js"></script>
|
||||
<script src="../../../build/dist/react-dom.prod.min.js"></script>
|
||||
<script src="../../../build/dist/react.production.min.js"></script>
|
||||
<script src="../../../build/dist/react-dom.production.min.js"></script>
|
||||
<div id="container"></div>
|
||||
<script>
|
||||
ReactDOM.render(
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<script>
|
||||
requirejs.config({
|
||||
paths: {
|
||||
react: '../../../build/dist/react.dev',
|
||||
'react-dom': '../../../build/dist/react-dom.dev'
|
||||
react: '../../../build/dist/react.development',
|
||||
'react-dom': '../../../build/dist/react-dom.development'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<script>
|
||||
requirejs.config({
|
||||
paths: {
|
||||
react: '../../../build/dist/react.prod.min',
|
||||
'react-dom': '../../../build/dist/react-dom.prod.min'
|
||||
react: '../../../build/dist/react.production.min',
|
||||
'react-dom': '../../../build/dist/react-dom.production.min'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ module.exports = {
|
||||
out: 'output.js',
|
||||
optimize: 'none',
|
||||
paths: {
|
||||
react: '../../../../build/dist/react.dev',
|
||||
'react-dom': '../../../../build/dist/react-dom.dev',
|
||||
react: '../../../../build/dist/react.development',
|
||||
'react-dom': '../../../../build/dist/react-dom.development',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ module.exports = {
|
||||
out: 'output.js',
|
||||
optimize: 'none',
|
||||
paths: {
|
||||
react: '../../../../build/dist/react.prod.min',
|
||||
'react-dom': '../../../../build/dist/react-dom.prod.min',
|
||||
react: '../../../../build/dist/react.production.min',
|
||||
'react-dom': '../../../../build/dist/react-dom.production.min',
|
||||
},
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
System.config({
|
||||
paths: {
|
||||
react: '../../../../build/dist/react.dev.js',
|
||||
'react-dom': '../../../../build/dist/react-dom.dev.js',
|
||||
react: '../../../../build/dist/react.development.js',
|
||||
'react-dom': '../../../../build/dist/react-dom.development.js',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
System.config({
|
||||
paths: {
|
||||
react: '../../../../build/dist/react.prod.min.js',
|
||||
'react-dom': '../../../../build/dist/react-dom.prod.min.js',
|
||||
react: '../../../../build/dist/react.production.min.js',
|
||||
'react-dom': '../../../../build/dist/react-dom.production.min.js',
|
||||
},
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,8 +5,8 @@
|
||||
<script>
|
||||
System.config({
|
||||
paths: {
|
||||
react: '../../../build/dist/react.dev.js',
|
||||
'react-dom': '../../../build/dist/react-dom.dev.js'
|
||||
react: '../../../build/dist/react.development.js',
|
||||
'react-dom': '../../../build/dist/react-dom.development.js'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<script>
|
||||
System.config({
|
||||
paths: {
|
||||
react: '../../../build/dist/react.prod.min.js',
|
||||
'react-dom': '../../../build/dist/react-dom.prod.min.js'
|
||||
react: '../../../build/dist/react.production.min.js',
|
||||
'react-dom': '../../../build/dist/react-dom.production.min.js'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ module.exports = {
|
||||
resolve: {
|
||||
root: path.resolve('../../../../build/packages'),
|
||||
alias: {
|
||||
'react': 'react/dist/react.dev',
|
||||
'react-dom': 'react-dom/dist/react-dom.dev',
|
||||
'react': 'react/umd/react.development',
|
||||
'react-dom': 'react-dom/umd/react-dom.development',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -8,8 +8,8 @@ module.exports = {
|
||||
resolve: {
|
||||
root: path.resolve('../../../../build/packages'),
|
||||
alias: {
|
||||
'react': 'react/dist/react.prod.min',
|
||||
'react-dom': 'react-dom/dist/react-dom.prod.min',
|
||||
'react': 'react/umd/react.production.min',
|
||||
'react-dom': 'react-dom/umd/react-dom.production.min',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./react-dom.node-prod.min.js');
|
||||
module.exports = require('./cjs/react-dom.production.min.js');
|
||||
} else {
|
||||
module.exports = require('./react-dom.node-dev.js');
|
||||
module.exports = require('./cjs/react-dom.development.js');
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./react-test-renderer.node-dev');
|
||||
module.exports = require('./cjs/react-test-renderer.development');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./react.node-prod.min.js');
|
||||
module.exports = require('./cjs/react.production.min.js');
|
||||
} else {
|
||||
module.exports = require('./react.node-dev.js');
|
||||
module.exports = require('./cjs/react.development.js');
|
||||
}
|
||||
|
||||
+17
-8
@@ -108,7 +108,6 @@ function updateBabelConfig(babelOpts, bundleType) {
|
||||
case NODE_PROD:
|
||||
case RN:
|
||||
newOpts = Object.assign({}, babelOpts);
|
||||
|
||||
// we add the objectAssign transform for these bundles
|
||||
newOpts.plugins = newOpts.plugins.slice();
|
||||
newOpts.plugins.push(
|
||||
@@ -118,9 +117,8 @@ function updateBabelConfig(babelOpts, bundleType) {
|
||||
case FB_DEV:
|
||||
case FB_PROD:
|
||||
newOpts = Object.assign({}, babelOpts);
|
||||
|
||||
// for FB, we don't want the devExpressionWithCodes plugin to run
|
||||
newOpts.plugins = [require.resolve('babel-plugin-external-helpers')];
|
||||
newOpts.plugins = [];
|
||||
return newOpts;
|
||||
}
|
||||
}
|
||||
@@ -180,9 +178,9 @@ function getFilename(name, hasteName, bundleType) {
|
||||
case UMD_PROD:
|
||||
return `${name}.production.min.js`;
|
||||
case NODE_DEV:
|
||||
return `${name}.node-development.js`;
|
||||
return `${name}.development.js`;
|
||||
case NODE_PROD:
|
||||
return `${name}.node-production.min.js`;
|
||||
return `${name}.production.min.js`;
|
||||
case RN:
|
||||
return `${hasteName}.js`;
|
||||
case FB_DEV:
|
||||
@@ -293,17 +291,28 @@ function copyBundleIntoNodePackage(packageName, filename, bundleType) {
|
||||
if (existsSync(packageDirectory)) {
|
||||
let from = resolve(`./build/${filename}`);
|
||||
let to = `${packageDirectory}/${filename}`;
|
||||
// for UMD bundles we have to move the files into a dist directory
|
||||
// for UMD bundles we have to move the files into a umd directory
|
||||
// within the package directory. we also need to set the from
|
||||
// to be the root build from directory
|
||||
if (bundleType === UMD_DEV || bundleType === UMD_PROD) {
|
||||
const distDirectory = `${packageDirectory}/dist`;
|
||||
const distDirectory = `${packageDirectory}/umd`;
|
||||
// create a dist directory if not created
|
||||
if (!existsSync(distDirectory)) {
|
||||
mkdirSync(distDirectory);
|
||||
}
|
||||
from = resolve(`./build/dist/${filename}`);
|
||||
to = `${packageDirectory}/dist/${filename}`;
|
||||
to = `${packageDirectory}/umd/${filename}`;
|
||||
}
|
||||
// for NODE bundles we have to move the files into a cjs directory
|
||||
// within the package directory. we also need to set the from
|
||||
// to be the root build from directory
|
||||
if (bundleType === NODE_DEV || bundleType === NODE_PROD) {
|
||||
const distDirectory = `${packageDirectory}/cjs`;
|
||||
// create a dist directory if not created
|
||||
if (!existsSync(distDirectory)) {
|
||||
mkdirSync(distDirectory);
|
||||
}
|
||||
to = `${packageDirectory}/cjs/${filename}`;
|
||||
}
|
||||
return asyncCopyTo(from, to).then(() => {
|
||||
// delete the old file if this is a not a UMD bundle
|
||||
|
||||
@@ -24,7 +24,6 @@ const babelOptsReact = {
|
||||
const babelOptsReactART = Object.assign({}, babelOptsReact, {
|
||||
// Include JSX
|
||||
presets: [require.resolve('babel-preset-react')],
|
||||
plugins: [require.resolve('babel-plugin-external-helpers')],
|
||||
});
|
||||
|
||||
const bundles = [
|
||||
|
||||
Reference in New Issue
Block a user