adds support for babel-plugin-transform-runtime

This commit is contained in:
Wyatt Johnson
2017-07-31 15:51:34 +10:00
parent 2217c89aa7
commit 08edddf0df
18 changed files with 55 additions and 21 deletions
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+5
View File
@@ -267,6 +267,11 @@ Talk.render = function(el, opts) {
console.warn(
'This page does not include a canonical link tag. Talk has inferred this asset_url from the window object. Query params have been stripped, which may cause a single thread to be present across multiple pages.'
);
if (!window.location.origin) {
window.location.origin = `${window.location.protocol}//${window.location.hostname}${window.location.port ? `:${window.location.port}` : ''}`;
}
query.asset_url = window.location.origin + window.location.pathname;
}
}
+2 -1
View File
@@ -325,7 +325,8 @@ While building your plugin you need to specify a `.eslintrc.json` file and a`.ba
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
```
+2
View File
@@ -150,10 +150,12 @@
"babel-plugin-transform-object-assign": "^6.8.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-react-jsx": "^6.23.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-0": "^6.16.0",
"babel-runtime": "^6.25.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"chai-http": "^3.0.0",
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
["transform-react-jsx": {"polyfill": false}],
["transform-runtime", {"polyfill": false}]
]
}
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+2 -1
View File
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
@@ -9,6 +9,7 @@
"transform-object-assign",
"transform-object-rest-spread",
"transform-async-to-generator",
"transform-react-jsx"
"transform-react-jsx",
["transform-runtime", {"polyfill": false}]
]
}
+7 -7
View File
@@ -33,6 +33,7 @@ const buildEmbeds = [
const config = {
devtool: 'cheap-module-source-map',
target: 'web',
output: {
path: path.join(__dirname, 'dist'),
publicPath: '/client/',
@@ -154,11 +155,7 @@ if (process.env.NODE_ENV === 'production') {
// Applies the base configuration to the following entries.
const applyConfig = (entries, root = {}) => _.merge({}, config, {
entry: entries.reduce((entry, {name, path}) => {
entry[name] = [
'babel-polyfill',
path
];
entry[name] = path;
return entry;
}, {})
}, root);
@@ -183,7 +180,7 @@ module.exports = [
// All framework targets/embeds/plugins.
applyConfig([
// // Load in all the targets.
// Load in all the targets.
...buildTargets.map((target) => ({
name: `${target}/bundle`,
path: path.join(__dirname, 'client/', target, '/src/index')
@@ -192,7 +189,10 @@ module.exports = [
// Load in all the embeds.
...buildEmbeds.map((embed) => ({
name: `embed/${embed}/bundle`,
path: path.join(__dirname, 'client/', `coral-embed-${embed}`, '/src/index')
path: [
'babel-polyfill',
path.join(__dirname, 'client/', `coral-embed-${embed}`, '/src/index')
]
})),
// Load in all the plugin entries.
+13
View File
@@ -989,6 +989,12 @@ babel-plugin-transform-regenerator@^6.24.1:
dependencies:
regenerator-transform "0.9.11"
babel-plugin-transform-runtime@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"
dependencies:
babel-runtime "^6.22.0"
babel-plugin-transform-strict-mode@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
@@ -1110,6 +1116,13 @@ babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.2.0, babel-runtim
core-js "^2.4.0"
regenerator-runtime "^0.10.0"
babel-runtime@^6.25.0:
version "6.25.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.25.0.tgz#33b98eaa5d482bb01a8d1aa6b437ad2b01aec41c"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.10.0"
babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.3.0:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333"