fix test cases

This commit is contained in:
Tobias Koppers 2020-09-18 11:36:16 +02:00
parent f263359fd8
commit 51c546bb99
4 changed files with 16 additions and 2 deletions

View File

@ -303,6 +303,7 @@ describe("Defaults", () => {
"hotUpdateMainFilename": "[fullhash].hot-update.json",
"iife": true,
"importFunctionName": "import",
"importMetaName": "import.meta",
"library": undefined,
"module": false,
"path": "<cwd>/dist",

View File

@ -496,7 +496,7 @@ describe("Validation", () => {
expect(msg).toMatchInlineSnapshot(`
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.output has an unknown property 'ecmaVersion'. These properties are valid:
object { assetModuleFilename?, auxiliaryComment?, charset?, chunkFilename?, chunkFormat?, chunkLoadTimeout?, chunkLoading?, chunkLoadingGlobal?, compareBeforeEmit?, crossOriginLoading?, devtoolFallbackModuleFilenameTemplate?, devtoolModuleFilenameTemplate?, devtoolNamespace?, enabledChunkLoadingTypes?, enabledLibraryTypes?, enabledWasmLoadingTypes?, environment?, filename?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateGlobal?, hotUpdateMainFilename?, iife?, importFunctionName?, library?, libraryExport?, libraryTarget?, module?, path?, pathinfo?, publicPath?, scriptType?, sourceMapFilename?, sourcePrefix?, strictModuleExceptionHandling?, umdNamedDefine?, uniqueName?, wasmLoading?, webassemblyModuleFilename?, workerChunkLoading?, workerWasmLoading? }
object { assetModuleFilename?, auxiliaryComment?, charset?, chunkFilename?, chunkFormat?, chunkLoadTimeout?, chunkLoading?, chunkLoadingGlobal?, compareBeforeEmit?, crossOriginLoading?, devtoolFallbackModuleFilenameTemplate?, devtoolModuleFilenameTemplate?, devtoolNamespace?, enabledChunkLoadingTypes?, enabledLibraryTypes?, enabledWasmLoadingTypes?, environment?, filename?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateGlobal?, hotUpdateMainFilename?, iife?, importFunctionName?, importMetaName?, library?, libraryExport?, libraryTarget?, module?, path?, pathinfo?, publicPath?, scriptType?, sourceMapFilename?, sourcePrefix?, strictModuleExceptionHandling?, umdNamedDefine?, uniqueName?, wasmLoading?, webassemblyModuleFilename?, workerChunkLoading?, workerWasmLoading? }
-> Options affecting the output of the compilation. \`output\` options tell webpack how to write the compiled files to disk.
Did you mean output.environment?"
`)

View File

@ -2445,6 +2445,19 @@ Object {
"multiple": false,
"simpleType": "string",
},
"output-import-meta-name": Object {
"configs": Array [
Object {
"description": "The name of the native import.meta object (can be exchanged for a polyfill).",
"multiple": false,
"path": "output.importMetaName",
"type": "string",
},
],
"description": "The name of the native import.meta object (can be exchanged for a polyfill).",
"multiple": false,
"simpleType": "string",
},
"output-library": Object {
"configs": Array [
Object {

View File

@ -4,7 +4,7 @@ module.exports = {
target: "electron-renderer",
output: {
assetModuleFilename: "[name][ext]",
importFunctionName: "pseudoImport",
importMetaName: "pseudoImport.meta",
scriptType: "module",
filename: "index.mjs"
},