Best practice of the webpack configuration

  • Unknown's avatar

    Hi Support!

    I’m developing a new plugin and now I want to implement some things related to the Gutenberg editor. I create new custom blocks (no problem for that) and want to add filters to change the editing components of certain blocks (can’t do that).

    I have this situation: I use npm command wp-scripts build to build my blocks, it works perfectly. Then I tried to add a JS file, outside the blocks (inside the assets/js directory), which should only include hooks, it’s JSX. I can’t build it, added webpack config to build it, but it starts to break blocks native command workflow (wp-scripts build).

    Can you help me to have a standard and good configuration that I can build my blocks and JSX files outside my blocks?

    Thanks in advance,
    Vahan

  • The topic ‘Best practice of the webpack configuration’ is closed to new replies.