Skip to content

Commit

Permalink
npm updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wobba committed Feb 26, 2024
1 parent cda93b7 commit ed7cbb1
Show file tree
Hide file tree
Showing 3 changed files with 959 additions and 5,432 deletions.
37 changes: 21 additions & 16 deletions search-parts/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ const envCheck = build.subTask('environmentCheck', (gulp, config, done) => {
}

generatedConfiguration.module.rules.push({
test: /\.js$/,
include: [
/lit/,
/@lit/,
/lit-html/
],
use: {
loader: 'babel-loader',
options: {
plugins: [
'@babel/plugin-transform-optional-chaining',
'@babel/plugin-transform-nullish-coalescing-operator',
'@babel/plugin-transform-logical-assignment-operators'
]
test: /\.js$/,
include: [
/lit/,
/@lit/,
/lit-html/
],
use: {
loader: 'babel-loader',
options: {
plugins: [
'@babel/plugin-transform-optional-chaining',
'@babel/plugin-transform-nullish-coalescing-operator',
'@babel/plugin-transform-logical-assignment-operators'
]
}
}
}
}, {
test: /utils\.js$/,
loader: 'unlazy-loader',
Expand All @@ -91,14 +91,19 @@ const envCheck = build.subTask('environmentCheck', (gulp, config, done) => {
replace: '',
flags: 'g'
}
}, {
// Skip HoverReactionsBar from spfx controls as it's not used and is bundles
test: /index\.js$/,
include: [/spfx-controls-react\/lib\/controls\/HoverReactionsBar/],
loader: 'ignore-loader',
});

generatedConfiguration.optimization.splitChunks.cacheGroups = { vendors: false };

// pack each moment.js locale individually to optimize bundle
generatedConfiguration.plugins.push(
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
);
);

if (config.production) {
const lastDirName = path.basename(__dirname);
Expand Down
Loading

0 comments on commit ed7cbb1

Please sign in to comment.