WPBP / WordPress-Plugin-Boilerplate-Powered

Wordpress Plugin Boilerplate but Powered with examples and a generator!
https://wpbp.github.io/
GNU General Public License v3.0
782 stars 116 forks source link

`npm i` Can't find `assets/src/plugin-block.js` #229

Closed kauaicreative closed 1 year ago

kauaicreative commented 1 year ago

Here is a bug and a fix.

  1. run generator after removing the "snippet": { "backend": ["block"] ...
  2. npm i will throw an error trying to compile the missing assets/src/plugin-block.js.

commenting out 'plugin-block' in webpack.config.js fixes the issue.

[
    'plugin-admin',
    // 'plugin-block',
    'plugin-public',
    'plugin-settings'
]
Mte90 commented 1 year ago

Did your plugin had the blocks? because probably is an issue in the generator and not in the boilerplate: https://github.com/WPBP/generator

Mte90 commented 1 year ago

Checked the code, it is a generator bug and not in the boilerplate. We just remove the php files but not that line in the webpack.config.js. I am working on a fix.

Mte90 commented 1 year ago

Bug fixed in the latest release of the generator https://github.com/WPBP/generator/releases/tag/1.3.6 For the future if there are issues on the generator can you open a ticket in the right repository? just to avoid confusion for me