@k8slens/package-build 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k8slens/package-build",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "lens": {
5
5
  "env": "agnostic",
6
6
  "layer": "infrastructure",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "devDependencies": {
74
74
  "@async-fn/jest": "^1.6.4",
75
- "@k8slens/typescript": "^8.0.0",
75
+ "@k8slens/typescript": "^8.1.0",
76
76
  "@lensapp/jest": "^7.2.0",
77
77
  "@types/semver": "^7.7.0"
78
78
  },
@@ -165,15 +165,15 @@ const nativeNodeModulesPlugin: Plugin = {
165
165
  },
166
166
  };
167
167
 
168
- // Keep .png imports as require() calls in the dist bundle instead of inlining
169
- // them as base64 data urls, so images ship as files loaded on demand rather
170
- // than megabytes of string literals in every consuming bundle. The import
171
- // path is rewritten to stay correct relative to the output file, since the
172
- // application build resolves it from there with its "file" loader.
168
+ // Keep .png and .webm imports as require() calls in the dist bundle instead of
169
+ // inlining them as base64 data urls, so images and videos ship as files loaded
170
+ // on demand rather than megabytes of string literals in every consuming bundle.
171
+ // The import path is rewritten to stay correct relative to the output file,
172
+ // since the application build resolves it from there with its "file" loader.
173
173
  const externalImagesPlugin: Plugin = {
174
174
  name: "external-images",
175
175
  setup(build) {
176
- build.onResolve({ filter: /\.png$/ }, (args) => {
176
+ build.onResolve({ filter: /\.(png|webm)$/ }, (args) => {
177
177
  const absolutePath = path.resolve(args.resolveDir, args.path);
178
178
  const outputDirectory = path.dirname(path.resolve(CWD, parsedArgs.outfile));
179
179
  const relativePath = path.relative(outputDirectory, absolutePath).split(path.sep).join("/");