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

Function rules

scripts/webpack.js:13–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11const isTest = process.env.NODE_ENV === 'test';
12
13function rules() {
14 return {
15 js: () => ({
16 test: /\.(ts|js)x?$/,
17 exclude: /node_modules/,
18 use: {
19 loader: 'babel-loader',
20 options: {
21 rootMode: 'upward',
22 },
23 },
24 }),
25 css: () => [
26 {
27 test: /\.css$/,
28 include: [/node_modules[\\/](ol|react-toastify|codemirror)[\\/]/],
29 use: ['to-string-loader', 'css-loader'],
30 },
31 ],
32 svg: () => ({
33 test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
34 exclude: [/node_modules/],
35 use: 'svg-inline-loader',
36 }),
37 wasm: () => ({
38 test: /\.wasm$/,
39 type: 'asset/resource',
40 }),
41 vfile: () => ({
42 test: /node_modules\/vfile\/core\.js/,
43 use: [
44 {
45 loader: 'imports-loader',
46 options: {
47 type: 'commonjs',
48 imports: ['single process/browser process'],
49 },
50 },
51 ],
52 }),
53 };
54}
55
56function plugins() {
57 return {

Callers 2

baseConfigFunction · 0.85
webpack.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected