mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 04:12:34 +00:00
Fix issues on Windows (#3213)
* Upgrade gatsby-remark-code-repls * fix path issue on Windows Gatsby uses `slash` to normalize paths. Because of this `path.join` causes an issue on Windows
This commit is contained in:
committed by
GitHub
parent
1cc8aa3f03
commit
81bfee964d
@@ -62,13 +62,14 @@ module.exports = {
|
||||
options: {
|
||||
defaultText: '<b>Try it on CodePen</b>',
|
||||
directory: `${__dirname}/examples/`,
|
||||
externals: [
|
||||
`//unpkg.com/react/umd/react.development.js`,
|
||||
`//unpkg.com/react-dom/umd/react-dom.development.js`,
|
||||
],
|
||||
dependencies: [`react`, `react-dom`],
|
||||
redirectTemplate: `${__dirname}/src/templates/codepen-example.js`,
|
||||
target: '_blank',
|
||||
codepen: {
|
||||
redirectTemplate: `${__dirname}/src/templates/codepen-example.js`,
|
||||
externals: [
|
||||
`//unpkg.com/react/umd/react.development.js`,
|
||||
`//unpkg.com/react-dom/umd/react-dom.development.js`,
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"gatsby-plugin-react-helmet": "^3.0.0",
|
||||
"gatsby-plugin-sharp": "^2.4.12",
|
||||
"gatsby-plugin-twitter": "^2.0.0",
|
||||
"gatsby-remark-code-repls": "^2.0.0",
|
||||
"gatsby-remark-code-repls": "^3.0.0",
|
||||
"gatsby-remark-copy-linked-files": "^2.0.0",
|
||||
"gatsby-remark-embed-snippet": "^3.0.0",
|
||||
"gatsby-remark-external-links": "^0.0.4",
|
||||
|
||||
@@ -19,7 +19,7 @@ exports.onCreateNode = async ({actions, node, loadNodeContent}) => {
|
||||
|
||||
if (
|
||||
sourceInstanceName === 'content' &&
|
||||
relativeDirectory === path.join('home', 'examples') &&
|
||||
relativeDirectory === 'home/examples' &&
|
||||
ext === '.js'
|
||||
) {
|
||||
const code = await loadNodeContent(node);
|
||||
|
||||
Reference in New Issue
Block a user