mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-09 06:38:52 +00:00
Multiple bottle-neck bugs have been fixed in SPFX which allows to update the WebPart with the latest SPFX packages. Overall performance should now be better and other minor bugs have been fixed.
29 lines
994 B
JavaScript
29 lines
994 B
JavaScript
'use strict';
|
|
|
|
const gulp = require('gulp');
|
|
const build = require('@microsoft/sp-build-web');
|
|
|
|
/********************************************************************************************
|
|
* Adds an alias for handlebars in order to avoid errors while gulping the project
|
|
* https://github.com/wycats/handlebars.js/issues/1174
|
|
* Adds a loader and a node setting for webpacking the handlebars-helpers correctly
|
|
* https://github.com/helpers/handlebars-helpers/issues/263
|
|
********************************************************************************************/
|
|
build.configureWebpack.mergeConfig({
|
|
additionalConfiguration: (generatedConfiguration) => {
|
|
|
|
generatedConfiguration.resolve.alias = { handlebars: 'handlebars/dist/handlebars.min.js' };
|
|
|
|
generatedConfiguration.module.rules.push(
|
|
{ test: /\.js$/, loader: 'unlazy-loader' }
|
|
);
|
|
|
|
generatedConfiguration.node = {
|
|
fs: 'empty'
|
|
}
|
|
|
|
return generatedConfiguration;
|
|
}
|
|
});
|
|
|
|
build.initialize(gulp); |