MCPcopy Create free account
hub / github.com/decaporg/decap-cms / plugins

Function plugins

scripts/webpack.js:57–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57function plugins() {
58 return {
59 ignoreEsprima: () => new webpack.IgnorePlugin({ resourceRegExp: /^esprima$/ }),
60 friendlyErrors: () => new FriendlyErrorsWebpackPlugin(),
61 buffer: () =>
62 new webpack.ProvidePlugin({
63 Buffer: ['buffer', 'Buffer'],
64 process: 'process/browser',
65 }),
66 nodePolyfill: () => new NodePolyfillPlugin(),
67 stripNodeProtocol: () =>
68 new webpack.NormalModuleReplacementPlugin(/^node:/, resource => {
69 const moduleName = resource.request.replace(/^node:/, '');
70 // Handle node:url specially to provide fileURLToPath polyfill
71 if (moduleName === 'url') {
72 resource.request = path.resolve(__dirname, 'shims/fileURLToPath.js');
73 } else {
74 resource.request = moduleName;
75 }
76 }),
77 };
78}
79
80function stats() {
81 if (isProduction) {

Callers 2

baseConfigFunction · 0.70
webpack.jsFile · 0.70

Calls 2

replaceMethod · 0.80
resolveMethod · 0.80

Tested by

no test coverage detected