2020-09-24 20:41:54 +08:00
|
|
|
/** @type {import("../../../../").Configuration} */
|
|
|
|
|
module.exports = {
|
2020-09-28 16:53:20 +08:00
|
|
|
target: "browserslist: ie 9",
|
|
|
|
|
plugins: [
|
|
|
|
|
compiler => {
|
|
|
|
|
compiler.hooks.compilation.tap("Test", compilation => {
|
|
|
|
|
expect(compilation.outputOptions.environment).toMatchInlineSnapshot(`
|
|
|
|
|
Object {
|
|
|
|
|
"arrowFunction": false,
|
|
|
|
|
"bigIntLiteral": false,
|
|
|
|
|
"const": false,
|
|
|
|
|
"destructuring": false,
|
|
|
|
|
"dynamicImport": false,
|
2023-05-30 03:05:03 +08:00
|
|
|
"dynamicImportInWorker": false,
|
2020-09-28 16:53:20 +08:00
|
|
|
"forOf": false,
|
2023-05-30 02:27:48 +08:00
|
|
|
"globalThis": false,
|
2020-09-28 16:53:20 +08:00
|
|
|
"module": false,
|
2023-05-30 02:27:48 +08:00
|
|
|
"optionalChaining": false,
|
|
|
|
|
"templateLiteral": false,
|
2020-09-28 16:53:20 +08:00
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|
expect(compilation.options.externalsPresets).toMatchInlineSnapshot(`
|
|
|
|
|
Object {
|
|
|
|
|
"electron": false,
|
|
|
|
|
"electronMain": false,
|
|
|
|
|
"electronPreload": false,
|
|
|
|
|
"electronRenderer": false,
|
|
|
|
|
"node": false,
|
|
|
|
|
"nwjs": false,
|
|
|
|
|
"web": true,
|
|
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
]
|
2020-09-24 20:41:54 +08:00
|
|
|
};
|