Browse Source

[Beta] Exclude Markdown parser (#5123)

main
dan 3 years ago
committed by GitHub
parent
commit
931fd9657e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      beta/next.config.js
  2. 7
      beta/src/utils/codemirrorMarkdownShim.js

6
beta/next.config.js

@ -46,8 +46,12 @@ const nextConfig = {
// Don't bundle the shim unnecessarily.
config.resolve.alias['use-sync-external-store/shim'] = 'react';
const {IgnorePlugin} = require('webpack');
const {IgnorePlugin, NormalModuleReplacementPlugin} = require('webpack');
config.plugins.push(
new NormalModuleReplacementPlugin(
/@codemirror\/lang-markdown/,
require.resolve('./src/utils/codemirrorMarkdownShim.js')
),
new IgnorePlugin({
checkResource(resource, context) {
if (

7
beta/src/utils/codemirrorMarkdownShim.js

@ -0,0 +1,7 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
export function markdown() {
return 'Not used on React Beta site.';
}
Loading…
Cancel
Save