Add fast serve
This commit is contained in:
parent
700e8b5ee8
commit
035f862996
|
@ -32,3 +32,4 @@ obj
|
||||||
|
|
||||||
# Styles Generated Code
|
# Styles Generated Code
|
||||||
*.scss.ts
|
*.scss.ts
|
||||||
|
*.scss.d.ts
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/s-KaiNet/spfx-fast-serve/master/schema/config.latest.schema.json",
|
||||||
|
"cli": {
|
||||||
|
"isLibraryComponent": false
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* User webpack settings file. You can add your own settings here.
|
||||||
|
* Changes from this file will be merged into the base webpack configuration file.
|
||||||
|
* This file will not be overwritten by the subsequent spfx-fast-serve calls.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// you can add your project related webpack configuration here, it will be merged using webpack-merge module
|
||||||
|
// i.e. plugins: [new webpack.Plugin()]
|
||||||
|
const webpackConfig = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// for even more fine-grained control, you can apply custom webpack settings using below function
|
||||||
|
const transformConfig = function (initialWebpackConfig) {
|
||||||
|
// transform the initial webpack config here, i.e.
|
||||||
|
// initialWebpackConfig.plugins.push(new webpack.Plugin()); etc.
|
||||||
|
|
||||||
|
return initialWebpackConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
webpackConfig,
|
||||||
|
transformConfig
|
||||||
|
}
|
|
@ -13,4 +13,10 @@ build.rig.getTasks = function () {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* fast-serve */
|
||||||
|
const { addFastServe } = require("spfx-fast-serve-helpers");
|
||||||
|
addFastServe(build);
|
||||||
|
/* end of fast-serve */
|
||||||
|
|
||||||
build.initialize(require('gulp'));
|
build.initialize(require('gulp'));
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp bundle",
|
"build": "gulp bundle",
|
||||||
"clean": "gulp clean",
|
"clean": "gulp clean",
|
||||||
"test": "gulp test"
|
"test": "gulp test",
|
||||||
|
"serve": "gulp bundle --custom-serve --max_old_space_size=4096 && fast-serve"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "2.3.1",
|
"tslib": "2.3.1",
|
||||||
|
@ -32,6 +33,7 @@
|
||||||
"@types/react": "16.9.51",
|
"@types/react": "16.9.51",
|
||||||
"@types/react-dom": "16.9.8",
|
"@types/react-dom": "16.9.8",
|
||||||
"eslint-plugin-react-hooks": "4.3.0",
|
"eslint-plugin-react-hooks": "4.3.0",
|
||||||
"@microsoft/sp-module-interfaces": "1.15.2"
|
"@microsoft/sp-module-interfaces": "1.15.2",
|
||||||
|
"spfx-fast-serve-helpers": "~1.15.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue