Skip to content

Commit e645128

Browse files
authored
Merge pull request #916 from s-KaiNet/fast-serve
Added fast-serve support.
2 parents f95ab4e + 54c07b4 commit e645128

File tree

8 files changed

+35709
-2123
lines changed

8 files changed

+35709
-2123
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ docs/documentation/site
4242

4343
# release
4444
release
45+
*.scss.d.ts

fast-serve/config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/s-KaiNet/spfx-fast-serve/master/schema/config.1.1.schema.json",
3+
"cli": {
4+
"isLibraryComponent": false
5+
}
6+
}

fast-serve/webpack.extend.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* User webpack settings file. You can add your own settings here.
3+
* Changes from this file will be merged into the base webpack configuration file.
4+
* This file will not be overwritten by the subsequent spfx-fast-serve calls.
5+
*/
6+
7+
// you can add your project related webpack configuration here, it will be merged using webpack-merge module
8+
// i.e. plugins: [new webpack.Plugin()]
9+
const webpackConfig = {
10+
11+
}
12+
13+
// for even more fine-grained control, you can apply custom webpack settings using below function
14+
const transformConfig = function (initialWebpackConfig) {
15+
// transform the initial webpack config here, i.e.
16+
// initialWebpackConfig.plugins.push(new webpack.Plugin()); etc.
17+
18+
return initialWebpackConfig;
19+
}
20+
21+
module.exports = {
22+
webpackConfig,
23+
transformConfig
24+
}

gulpfile.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ build.rig.getTasks = function () {
3737
return result;
3838
};
3939

40-
build.initialize(gulp);
40+
/* fast-serve */
41+
const { addFastServe } = require("spfx-fast-serve-helpers");
42+
addFastServe(build);
43+
/* end of fast-serve */
44+
45+
build.initialize(require('gulp'));
46+
4147

4248
const karmaTask = build.karma;
4349
if (karmaTask) {

0 commit comments

Comments
 (0)