forked from QwikDev/qwik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsm.cjs
35 lines (33 loc) · 806 Bytes
/
tsm.cjs
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
const { join } = require('node:path');
const { pathToFileURL } = require('node:url');
const corePath = pathToFileURL(join(__dirname, 'packages', 'qwik', 'src', 'core', 'index.ts'));
module.exports = {
common: {
minifyWhitespace: true,
target: 'es2020',
},
config: {
'.tsx': {
jsxFactory: 'qwikJsx.h',
jsxFragment: 'qwikJsx.Fragment',
banner: `
globalThis.qTest = true;
globalThis.qRuntimeQrl = true;
globalThis.qDev = true;
globalThis.qInspector = false;
import * as qwikJsx from "${corePath}";`,
target: 'es2020',
loader: 'tsx',
minify: false,
},
'.ts': {
loader: 'ts',
banner: `
globalThis.qTest = true;
globalThis.qRuntimeQrl = true;
globalThis.qDev = true;
`,
minify: false,
},
},
};