fix test cases
This commit is contained in:
parent
f263359fd8
commit
51c546bb99
|
@ -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",
|
||||
|
|
|
@ -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?"
|
||||
`)
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -4,7 +4,7 @@ module.exports = {
|
|||
target: "electron-renderer",
|
||||
output: {
|
||||
assetModuleFilename: "[name][ext]",
|
||||
importFunctionName: "pseudoImport",
|
||||
importMetaName: "pseudoImport.meta",
|
||||
scriptType: "module",
|
||||
filename: "index.mjs"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue