Closed 6gal6ler6 closed 2 months ago
I'm having the same issue, but where is the webpack.extend.js
in your repo? 👀
Edit: that's how I understood that webpack.extend.js
must be placed in /fast-serve
, not in /
Solved the problem for me with 1.19.0
Edit 2: fast-serve webpack extend
didn't create the file for me.
According to "Webpack extensibility", is not required
This is not a fast-serve issue actually, because before running, fast-serve relies on gulp bundle
command and executes it. If the command fails, fast-serve will work incorrectly.
The issue here is actually in webpack 5, introduced in SPFx 1.19, which now loads some imports differently, which leads to your problem (Cannot find module.... etc
). So I will close the issue, since I cannot fix it, it's on SPFx side :blush:
PS:
Edit 2: fast-serve webpack extend didn't create the file for me.
you should run npx fast-serve webpack extend
and it will create the file. Also check that you have the right versions for fast-serve, this command only available in 1.18+
Description:
I found that Fast Serve breaks in SPFx 1.19.0 when you use Specific Imports from Paths.
This was not happening before, as I got a big project with many webparts and imports and I always use Specific Imports from Paths instead of Single Import from Module Entry Point
Problem Statement:
How to reproduce:
Create a new project using SPFx 1.19.0, add some dependencies and add fast serve.
Example Code: https://github.com/6gal6ler6/fast-serve-1190-issues
Let´s execute the
fast-serve
command:Well, well, well... let´s try "gulp serve instead"...
Clean the Project and Build it 😊
Run "gulp serve":
Oh No
Lets see if one can find more... BINGO...
Changed imports
reload ... and it works
Lets see if
fast-serve
works nowWell it worked after I changed to "Single Import from Module Entry Point"
package.json Dependencies: