-
-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathraw-plugin.js
More file actions
41 lines (41 loc) · 1.16 KB
/
raw-plugin.js
File metadata and controls
41 lines (41 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module.exports = function (context, options) {
return {
name: 'raw-plugin',
// to support running babel transformer we need to polyfill node api 'fs'
configureWebpack(config, isServer, utils) {
return {
ignoreWarnings: [
// Suppress warning about dynamic import expressions in monaco-init.ts
// This is expected behavior for dynamic TypeScript definition loading
{
module: /monaco-init\.ts/,
message:
/Critical dependency: the request of a dependency is an expression/,
},
],
module: {
rules: [
{
resourceQuery: /raw/,
type: 'asset/source',
},
/*{
test: /\.m?[jt]sx?$/i,
//exclude: config.module.rules
oneOf: [
{
resourceQuery: /raw/,
type: 'asset/source',
},
{
resourceQuery: { not: [/raw/] },
...utils.getJSLoader(isServer),
},
],
},*/
],
},
};
},
};
};