@vocab/webpack 1.2.9 → 1.2.10

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/README.md CHANGED
@@ -39,8 +39,8 @@ This is the language Vocab will assume when it sees a `translation.json` file wi
39
39
  ```js
40
40
  // vocab.config.js
41
41
  module.exports = {
42
- languages: [{ name: 'en' }, { name: 'fr' }]
43
- devLanguage: 'en',
42
+ languages: [{ name: 'en' }, { name: 'fr' }],
43
+ devLanguage: 'en'
44
44
  };
45
45
  ```
46
46
 
@@ -48,7 +48,7 @@ function createIdentifier(lang, resourcePath, loadedTranslation) {
48
48
  langJson[key] = languageTranslations[key].message;
49
49
  }
50
50
  const base64 = Buffer.from(JSON.stringify(langJson), 'utf-8').toString('base64');
51
- const unloader = `${virtualResourceLoader}?source=${base64}`;
51
+ const unloader = `${virtualResourceLoader}?source=${encodeURIComponent(base64)}`;
52
52
  const fileIdent = path__default["default"].basename(resourcePath, 'translations.json');
53
53
  return `./${fileIdent}-${lang}-virtual.json!=!${unloader}!`;
54
54
  }
@@ -48,7 +48,7 @@ function createIdentifier(lang, resourcePath, loadedTranslation) {
48
48
  langJson[key] = languageTranslations[key].message;
49
49
  }
50
50
  const base64 = Buffer.from(JSON.stringify(langJson), 'utf-8').toString('base64');
51
- const unloader = `${virtualResourceLoader}?source=${base64}`;
51
+ const unloader = `${virtualResourceLoader}?source=${encodeURIComponent(base64)}`;
52
52
  const fileIdent = path__default["default"].basename(resourcePath, 'translations.json');
53
53
  return `./${fileIdent}-${lang}-virtual.json!=!${unloader}!`;
54
54
  }
@@ -20,7 +20,7 @@ function createIdentifier(lang, resourcePath, loadedTranslation) {
20
20
  langJson[key] = languageTranslations[key].message;
21
21
  }
22
22
  const base64 = Buffer.from(JSON.stringify(langJson), 'utf-8').toString('base64');
23
- const unloader = `${virtualResourceLoader}?source=${base64}`;
23
+ const unloader = `${virtualResourceLoader}?source=${encodeURIComponent(base64)}`;
24
24
  const fileIdent = path.basename(resourcePath, 'translations.json');
25
25
  return `./${fileIdent}-${lang}-virtual.json!=!${unloader}!`;
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocab/webpack",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/seek-oss/vocab.git",
@@ -44,12 +44,12 @@
44
44
  "web"
45
45
  ],
46
46
  "dependencies": {
47
- "@vocab/core": "^1.6.2",
48
47
  "cjs-module-lexer": "^1.2.2",
49
48
  "debug": "^4.3.1",
50
49
  "es-module-lexer": "^1.0.0",
51
50
  "picocolors": "^1.0.0",
52
- "virtual-resource-loader": "^1.0.1"
51
+ "@vocab/core": "^1.6.3",
52
+ "virtual-resource-loader": "^2.0.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/debug": "^4.1.5",