preactjs / preact-cli

😺 Your next Preact PWA starts in 30 seconds.
MIT License
4.69k stars 375 forks source link

Webpack plugin not applied #1666

Closed JMPSequeira closed 2 years ago

JMPSequeira commented 2 years ago

What is the current behaviour? Webpack Plugin never applied

Steps to reproduce the behavior:

  1. add a webpack plugin in preact.config.js
    
    import WriteFilePlugin from "write-file-webpack-plugin";
    import path from "path";

export default (config, env, _) => { config.output = config.output || {}; config.output.path = path.join(__dirname, "./wDist"); config.plugins.push(return new WriteFilePlugin()); };


2. run preact watch -c ./preact.config.js
3. Plugin apply never called

**What is the expected behaviour?**
Expect plugin to be applied

Environment Info:
  System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.1.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (98.0.1108.56)
  npmPackages:
    preact: ^10.3.1 => 10.6.6
    preact-cli: ^3.0.0 => 3.3.5
    preact-render-to-string: ^5.1.4 => 5.1.19
    preact-router: ^3.2.1 => 3.2.1
JMPSequeira commented 2 years ago

Nevermind, bug with the plugin.