admin管理员组

文章数量:1315789

I built a plugin that registers a Gutenberg block that prints a simple Mailchimp form. The plugin works with no issues. But, if I activate Jetpack and try to edit any page or post, I get a blank screen and multiple Uncaught TypeError: r is not a function console errors such as this one with little variations:

editor.js?ver=9.1:6 Uncaught TypeError: r is not a function (.js?ver=9.1)
    at editor.js?ver=9.1:6
    at Array.forEach (<anonymous>)
    at e.exports (editor.js?ver=9.1:6)
    at f (editor.js?ver=9.1:6)
    at Module.<anonymous> (editor.js?ver=9.1:18)
    at o (editor.js?ver=9.1:1)
    at Object.<anonymous> (editor.js?ver=9.1:18)
    at o (editor.js?ver=9.1:1)
    at editor.js?ver=9.1:1
    at editor.js?ver=9.1:1]

The index.js file in My Mailchimp block plugin imports two SCSS files so the build process is able to create the corresponding CSS files:

import './editor.scss';
import './style.scss';

I found that if I comment out the import './editor.scss' line, Jetpack stops throwing the console errors. So, it seems there's something in my plugin that is conflicting with Jetpack.

Am I importing the SCSS files incorrectly in my code? Can someone help me, please? I'm completely lost.

I'm running WP 5.5.3 and I have the SCRIPT_DEBUG constant set to true.

Thanks

本文标签: javascriptUncaught TypeError r is not a function