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

Function rules

scripts/webpack.js:14–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

baseConfigFunction · 0.85
webpack.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected