Skip to content

Commit

Permalink
fix: closure HtmlBasicPlugin environment property
Browse files Browse the repository at this point in the history
  • Loading branch information
9aoy committed Jun 28, 2024
1 parent 05768b7 commit 1e5b0b1
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 2,912 deletions.
277 changes: 2 additions & 275 deletions packages/compat/webpack/tests/__snapshots__/default.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -330,145 +330,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly 1`] = `
"version": 5,
},
HtmlBasicPlugin {
"environment": {
"browserslist": [
"chrome >= 87",
"edge >= 88",
"firefox >= 78",
"safari >= 14",
],
"distPath": "<ROOT>/packages/compat/webpack/tests/dist",
"entry": {
"index": "src/index.js",
},
"htmlPaths": {
"index": "index.html",
},
"index": 0,
"name": "web",
"normalizedConfig": {
"_privateMeta": {
"configFilePath": "/path/to/rsbuild.config.ts",
},
"dev": {
"assetPrefix": "/",
"client": {
"host": "",
"overlay": true,
"path": "/rsbuild-hmr",
"port": "",
},
"hmr": true,
"lazyCompilation": undefined,
"liveReload": true,
"writeToDisk": false,
},
"html": {
"crossorigin": false,
"inject": "head",
"meta": {
"charset": {
"charset": "UTF-8",
},
"viewport": "width=device-width, initial-scale=1.0",
},
"mountId": "root",
"outputStructure": "flat",
"scriptLoading": "defer",
"title": "Rsbuild App",
},
"output": {
"assetPrefix": "/",
"charset": "ascii",
"cssModules": {
"auto": true,
"exportGlobals": false,
"exportLocalsConvention": "camelCase",
"namedExport": false,
},
"dataUriLimit": {
"font": 4096,
"image": 4096,
"media": 4096,
"svg": 4096,
},
"distPath": {
"css": "static/css",
"font": "static/font",
"html": "/",
"image": "static/image",
"js": "static/js",
"media": "static/media",
"root": "dist",
"svg": "static/svg",
"wasm": "static/wasm",
},
"emitAssets": true,
"filename": {},
"filenameHash": true,
"injectStyles": false,
"inlineScripts": false,
"inlineStyles": false,
"legalComments": "linked",
"manifest": false,
"minify": true,
"polyfill": "usage",
"sourceMap": {
"css": false,
"js": undefined,
},
"target": "web",
},
"performance": {
"buildCache": true,
"chunkSplit": {
"strategy": "split-by-experience",
},
"printFileSize": true,
"profile": false,
"removeConsole": false,
"removeMomentLocale": false,
},
"security": {
"nonce": "",
"sri": {
"enable": false,
},
},
"server": {
"compress": true,
"host": "0.0.0.0",
"htmlFallback": "index",
"open": false,
"port": 3000,
"printUrls": true,
"strictPort": false,
},
"source": {
"alias": {},
"aliasStrategy": "prefer-tsconfig",
"decorators": {
"version": "2022-03",
},
"define": {},
"entry": {
"index": "src/index.js",
},
"preEntry": [],
"tsconfigPath": "<ROOT>/packages/compat/webpack/tests/tsconfig.json",
},
"tools": {
"cssExtract": {
"loaderOptions": {},
"pluginOptions": {
"ignoreOrder": true,
},
},
},
},
"target": "web",
"tsconfigPath": "<ROOT>/packages/compat/webpack/tests/tsconfig.json",
},
"getEnvironment": [Function],
"modifyTagsFn": [Function],
"name": "HtmlBasicPlugin",
"options": {
Expand Down Expand Up @@ -899,142 +761,7 @@ exports[`applyDefaultPlugins > should apply default plugins correctly when produ
"version": 5,
},
HtmlBasicPlugin {
"environment": {
"browserslist": [
"chrome >= 87",
"edge >= 88",
"firefox >= 78",
"safari >= 14",
],
"distPath": "<ROOT>/packages/compat/webpack/tests/dist",
"entry": {
"index": "src/index.js",
},
"htmlPaths": {
"index": "index.html",
},
"index": 0,
"name": "web",
"normalizedConfig": {
"dev": {
"assetPrefix": "/",
"client": {
"host": "",
"overlay": true,
"path": "/rsbuild-hmr",
"port": "",
},
"hmr": true,
"lazyCompilation": undefined,
"liveReload": true,
"writeToDisk": false,
},
"html": {
"crossorigin": false,
"inject": "head",
"meta": {
"charset": {
"charset": "UTF-8",
},
"viewport": "width=device-width, initial-scale=1.0",
},
"mountId": "root",
"outputStructure": "flat",
"scriptLoading": "defer",
"title": "Rsbuild App",
},
"output": {
"assetPrefix": "/",
"charset": "ascii",
"cssModules": {
"auto": true,
"exportGlobals": false,
"exportLocalsConvention": "camelCase",
"namedExport": false,
},
"dataUriLimit": {
"font": 4096,
"image": 4096,
"media": 4096,
"svg": 4096,
},
"distPath": {
"css": "static/css",
"font": "static/font",
"html": "/",
"image": "static/image",
"js": "static/js",
"media": "static/media",
"root": "dist",
"svg": "static/svg",
"wasm": "static/wasm",
},
"emitAssets": true,
"filename": {},
"filenameHash": true,
"injectStyles": false,
"inlineScripts": false,
"inlineStyles": false,
"legalComments": "linked",
"manifest": false,
"minify": true,
"polyfill": "usage",
"sourceMap": {
"css": false,
"js": undefined,
},
"target": "web",
},
"performance": {
"buildCache": true,
"chunkSplit": {
"strategy": "split-by-experience",
},
"printFileSize": true,
"profile": false,
"removeConsole": false,
"removeMomentLocale": false,
},
"security": {
"nonce": "",
"sri": {
"enable": false,
},
},
"server": {
"compress": true,
"host": "0.0.0.0",
"htmlFallback": "index",
"open": false,
"port": 3000,
"printUrls": true,
"strictPort": false,
},
"source": {
"alias": {},
"aliasStrategy": "prefer-tsconfig",
"decorators": {
"version": "2022-03",
},
"define": {},
"entry": {
"index": "src/index.js",
},
"preEntry": [],
"tsconfigPath": "<ROOT>/packages/compat/webpack/tests/tsconfig.json",
},
"tools": {
"cssExtract": {
"loaderOptions": {},
"pluginOptions": {
"ignoreOrder": true,
},
},
},
},
"target": "web",
"tsconfigPath": "<ROOT>/packages/compat/webpack/tests/tsconfig.json",
},
"getEnvironment": [Function],
"modifyTagsFn": [Function],
"name": "HtmlBasicPlugin",
"options": {
Expand Down
Loading

0 comments on commit 1e5b0b1

Please sign in to comment.