@vocab/webpack 1.2.21 → 1.2.23
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/dist/README.md +11 -0
- package/dist/chunk-name.cjs +2 -2
- package/dist/chunk-name.mjs +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/dist/loader.cjs +7 -8
- package/dist/loader.cjs.map +1 -1
- package/dist/loader.mjs +4 -5
- package/dist/loader.mjs.map +1 -1
- package/dist/{logger-Cse01Ceq.mjs → logger-Cr8WnlLB.mjs} +3 -5
- package/dist/{logger-Cse01Ceq.mjs.map → logger-Cr8WnlLB.mjs.map} +1 -1
- package/dist/{logger-rOiUqgqu.cjs → logger-Djpeczm2.cjs} +19 -25
- package/dist/{logger-rOiUqgqu.cjs.map → logger-Djpeczm2.cjs.map} +1 -1
- package/dist/web.cjs +8 -8
- package/dist/web.cjs.map +1 -1
- package/dist/web.mjs +1 -2
- package/dist/web.mjs.map +1 -1
- package/package.json +11 -11
package/dist/README.md
CHANGED
|
@@ -732,6 +732,17 @@ This flag accepts an array of glob patterns to ignore.
|
|
|
732
732
|
vocab push --branch my-branch --ignore "**/dist/**" "**/another_ignored_directory/**"
|
|
733
733
|
```
|
|
734
734
|
|
|
735
|
+
#### Auto-Translation
|
|
736
|
+
|
|
737
|
+
By default, Phrase may not apply the project's automatic translation behaviour for new keys uploaded via API.
|
|
738
|
+
|
|
739
|
+
The `--auto-translate` flag instructs Phrase to automatically translate any missing keys using machine translation.. See [Phrase auto-translate API Documentation] for more information.
|
|
740
|
+
|
|
741
|
+
```sh
|
|
742
|
+
vocab push --branch my-branch --auto-translate
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
[Phrase auto-translate API Documentation]: https://developers.phrase.com/en/api/strings/uploads/upload-a-new-file#body-autotranslate
|
|
735
746
|
[phrase]: https://developers.phrase.com/api/
|
|
736
747
|
|
|
737
748
|
#### [Tags]
|
package/dist/chunk-name.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/chunk-name.ts
|
|
3
3
|
function getChunkName(lang) {
|
|
4
4
|
return `${lang}-translations`;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
6
|
//#endregion
|
|
8
7
|
exports.getChunkName = getChunkName;
|
|
8
|
+
|
|
9
9
|
//# sourceMappingURL=chunk-name.cjs.map
|
package/dist/chunk-name.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_logger = require("./logger-Djpeczm2.cjs");
|
|
2
3
|
let _vocab_core = require("@vocab/core");
|
|
3
|
-
|
|
4
4
|
//#region src/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Import from `@vocab/core` instead
|
|
@@ -27,8 +27,8 @@ var VocabWebpackPlugin = class {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
|
|
31
30
|
//#endregion
|
|
32
31
|
exports.VocabWebpackPlugin = VocabWebpackPlugin;
|
|
33
32
|
exports.compiledVocabFileFilter = compiledVocabFileFilter;
|
|
33
|
+
|
|
34
34
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["_compiledVocabFileFilter"],"sources":["../src/index.ts"],"sourcesContent":["import {\n type UserConfig,\n resolveConfigSync,\n validateConfig,\n compiledVocabFileFilter as _compiledVocabFileFilter,\n} from '@vocab/core';\nimport type { Compiler } from 'webpack';\nimport { trace } from './logger';\n\ninterface UserOptions extends Partial<UserConfig> {\n configFile?: string;\n}\n\n/**\n * @deprecated Import from `@vocab/core` instead\n */\nexport const compiledVocabFileFilter = _compiledVocabFileFilter;\n\nexport class VocabWebpackPlugin {\n options: UserConfig;\n\n constructor({ configFile, ...rest }: UserOptions = {}) {\n trace(\n `Creating Vocab plugin${\n configFile ? ` with config file ${configFile}` : ''\n }`,\n );\n this.options = {\n ...resolveConfigSync(configFile),\n ...rest,\n } as UserConfig;\n\n validateConfig(this.options);\n }\n\n apply(compiler: Compiler) {\n trace(\n `Applying plugin: ${compiler.options.name} (${compiler.options.target})`,\n );\n if (!compiler.options.module) {\n // @ts-expect-error Support for older versions of webpack that may not have module defined at this stage\n compiler.options.module = { rules: [] };\n }\n if (!compiler.options.module.rules) {\n compiler.options.module.rules = [];\n }\n compiler.options.module.rules.splice(0, 0, {\n test: compiledVocabFileFilter,\n loader: require.resolve('@vocab/webpack/loader'),\n options: this.options,\n });\n }\n}\n"],"mappings":";;;;;;;AAgBA,MAAa,0BAA0BA;AAEvC,IAAa,qBAAb,MAAgC;CAC9B;CAEA,YAAY,EAAE,YAAY,GAAG,SAAsB,EAAE,EAAE;AACrD,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["_compiledVocabFileFilter"],"sources":["../src/index.ts"],"sourcesContent":["import {\n type UserConfig,\n resolveConfigSync,\n validateConfig,\n compiledVocabFileFilter as _compiledVocabFileFilter,\n} from '@vocab/core';\nimport type { Compiler } from 'webpack';\nimport { trace } from './logger';\n\ninterface UserOptions extends Partial<UserConfig> {\n configFile?: string;\n}\n\n/**\n * @deprecated Import from `@vocab/core` instead\n */\nexport const compiledVocabFileFilter = _compiledVocabFileFilter;\n\nexport class VocabWebpackPlugin {\n options: UserConfig;\n\n constructor({ configFile, ...rest }: UserOptions = {}) {\n trace(\n `Creating Vocab plugin${\n configFile ? ` with config file ${configFile}` : ''\n }`,\n );\n this.options = {\n ...resolveConfigSync(configFile),\n ...rest,\n } as UserConfig;\n\n validateConfig(this.options);\n }\n\n apply(compiler: Compiler) {\n trace(\n `Applying plugin: ${compiler.options.name} (${compiler.options.target})`,\n );\n if (!compiler.options.module) {\n // @ts-expect-error Support for older versions of webpack that may not have module defined at this stage\n compiler.options.module = { rules: [] };\n }\n if (!compiler.options.module.rules) {\n compiler.options.module.rules = [];\n }\n compiler.options.module.rules.splice(0, 0, {\n test: compiledVocabFileFilter,\n loader: require.resolve('@vocab/webpack/loader'),\n options: this.options,\n });\n }\n}\n"],"mappings":";;;;;;;AAgBA,MAAa,0BAA0BA,YAAAA;AAEvC,IAAa,qBAAb,MAAgC;CAC9B;CAEA,YAAY,EAAE,YAAY,GAAG,SAAsB,EAAE,EAAE;AACrD,iBAAA,MACE,wBACE,aAAa,qBAAqB,eAAe,KAEpD;AACD,OAAK,UAAU;GACb,IAAA,GAAA,YAAA,mBAAqB,WAAW;GAChC,GAAG;GACJ;AAED,GAAA,GAAA,YAAA,gBAAe,KAAK,QAAQ;;CAG9B,MAAM,UAAoB;AACxB,iBAAA,MACE,oBAAoB,SAAS,QAAQ,KAAK,IAAI,SAAS,QAAQ,OAAO,GACvE;AACD,MAAI,CAAC,SAAS,QAAQ,OAEpB,UAAS,QAAQ,SAAS,EAAE,OAAO,EAAE,EAAE;AAEzC,MAAI,CAAC,SAAS,QAAQ,OAAO,MAC3B,UAAS,QAAQ,OAAO,QAAQ,EAAE;AAEpC,WAAS,QAAQ,OAAO,MAAM,OAAO,GAAG,GAAG;GACzC,MAAM;GACN,QAAQ,QAAQ,QAAQ,wBAAwB;GAChD,SAAS,KAAK;GACf,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as __require, t as trace } from "./logger-
|
|
1
|
+
import { n as __require, t as trace } from "./logger-Cr8WnlLB.mjs";
|
|
2
2
|
import { compiledVocabFileFilter as compiledVocabFileFilter$1, resolveConfigSync, validateConfig } from "@vocab/core";
|
|
3
|
-
|
|
4
3
|
//#region src/index.ts
|
|
5
4
|
/**
|
|
6
5
|
* @deprecated Import from `@vocab/core` instead
|
|
@@ -27,7 +26,7 @@ var VocabWebpackPlugin = class {
|
|
|
27
26
|
});
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
30
|
export { VocabWebpackPlugin, compiledVocabFileFilter };
|
|
31
|
+
|
|
33
32
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["_compiledVocabFileFilter"],"sources":["../src/index.ts"],"sourcesContent":["import {\n type UserConfig,\n resolveConfigSync,\n validateConfig,\n compiledVocabFileFilter as _compiledVocabFileFilter,\n} from '@vocab/core';\nimport type { Compiler } from 'webpack';\nimport { trace } from './logger';\n\ninterface UserOptions extends Partial<UserConfig> {\n configFile?: string;\n}\n\n/**\n * @deprecated Import from `@vocab/core` instead\n */\nexport const compiledVocabFileFilter = _compiledVocabFileFilter;\n\nexport class VocabWebpackPlugin {\n options: UserConfig;\n\n constructor({ configFile, ...rest }: UserOptions = {}) {\n trace(\n `Creating Vocab plugin${\n configFile ? ` with config file ${configFile}` : ''\n }`,\n );\n this.options = {\n ...resolveConfigSync(configFile),\n ...rest,\n } as UserConfig;\n\n validateConfig(this.options);\n }\n\n apply(compiler: Compiler) {\n trace(\n `Applying plugin: ${compiler.options.name} (${compiler.options.target})`,\n );\n if (!compiler.options.module) {\n // @ts-expect-error Support for older versions of webpack that may not have module defined at this stage\n compiler.options.module = { rules: [] };\n }\n if (!compiler.options.module.rules) {\n compiler.options.module.rules = [];\n }\n compiler.options.module.rules.splice(0, 0, {\n test: compiledVocabFileFilter,\n loader: require.resolve('@vocab/webpack/loader'),\n options: this.options,\n });\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["_compiledVocabFileFilter"],"sources":["../src/index.ts"],"sourcesContent":["import {\n type UserConfig,\n resolveConfigSync,\n validateConfig,\n compiledVocabFileFilter as _compiledVocabFileFilter,\n} from '@vocab/core';\nimport type { Compiler } from 'webpack';\nimport { trace } from './logger';\n\ninterface UserOptions extends Partial<UserConfig> {\n configFile?: string;\n}\n\n/**\n * @deprecated Import from `@vocab/core` instead\n */\nexport const compiledVocabFileFilter = _compiledVocabFileFilter;\n\nexport class VocabWebpackPlugin {\n options: UserConfig;\n\n constructor({ configFile, ...rest }: UserOptions = {}) {\n trace(\n `Creating Vocab plugin${\n configFile ? ` with config file ${configFile}` : ''\n }`,\n );\n this.options = {\n ...resolveConfigSync(configFile),\n ...rest,\n } as UserConfig;\n\n validateConfig(this.options);\n }\n\n apply(compiler: Compiler) {\n trace(\n `Applying plugin: ${compiler.options.name} (${compiler.options.target})`,\n );\n if (!compiler.options.module) {\n // @ts-expect-error Support for older versions of webpack that may not have module defined at this stage\n compiler.options.module = { rules: [] };\n }\n if (!compiler.options.module.rules) {\n compiler.options.module.rules = [];\n }\n compiler.options.module.rules.splice(0, 0, {\n test: compiledVocabFileFilter,\n loader: require.resolve('@vocab/webpack/loader'),\n options: this.options,\n });\n }\n}\n"],"mappings":";;;;;;AAgBA,MAAa,0BAA0BA;AAEvC,IAAa,qBAAb,MAAgC;CAC9B;CAEA,YAAY,EAAE,YAAY,GAAG,SAAsB,EAAE,EAAE;AACrD,QACE,wBACE,aAAa,qBAAqB,eAAe,KAEpD;AACD,OAAK,UAAU;GACb,GAAG,kBAAkB,WAAW;GAChC,GAAG;GACJ;AAED,iBAAe,KAAK,QAAQ;;CAG9B,MAAM,UAAoB;AACxB,QACE,oBAAoB,SAAS,QAAQ,KAAK,IAAI,SAAS,QAAQ,OAAO,GACvE;AACD,MAAI,CAAC,SAAS,QAAQ,OAEpB,UAAS,QAAQ,SAAS,EAAE,OAAO,EAAE,EAAE;AAEzC,MAAI,CAAC,SAAS,QAAQ,OAAO,MAC3B,UAAS,QAAQ,OAAO,QAAQ,EAAE;AAEpC,WAAS,QAAQ,OAAO,MAAM,OAAO,GAAG,GAAG;GACzC,MAAM;GACN,QAAA,UAAgB,QAAQ,wBAAwB;GAChD,SAAS,KAAK;GACf,CAAC"}
|
package/dist/loader.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_logger = require(
|
|
2
|
-
const require_chunk_name = require(
|
|
1
|
+
const require_logger = require("./logger-Djpeczm2.cjs");
|
|
2
|
+
const require_chunk_name = require("./chunk-name.cjs");
|
|
3
3
|
let _vocab_core = require("@vocab/core");
|
|
4
4
|
let path = require("path");
|
|
5
5
|
path = require_logger.__toESM(path);
|
|
@@ -7,7 +7,6 @@ let cjs_module_lexer = require("cjs-module-lexer");
|
|
|
7
7
|
cjs_module_lexer = require_logger.__toESM(cjs_module_lexer);
|
|
8
8
|
let es_module_lexer = require("es-module-lexer");
|
|
9
9
|
es_module_lexer = require_logger.__toESM(es_module_lexer);
|
|
10
|
-
|
|
11
10
|
//#region src/loader.ts
|
|
12
11
|
const trace = require_logger.trace.extend("loader");
|
|
13
12
|
const virtualResourceLoader = require.resolve("virtual-resource-loader");
|
|
@@ -39,11 +38,11 @@ function renderLanguageLoaderAsync(resourcePath, loadedTranslation) {
|
|
|
39
38
|
}
|
|
40
39
|
function findExportNames(source, mode) {
|
|
41
40
|
if (mode === "esm") {
|
|
42
|
-
const [, exports
|
|
43
|
-
return exports
|
|
41
|
+
const [, exports] = es_module_lexer.parse(source);
|
|
42
|
+
return exports;
|
|
44
43
|
}
|
|
45
|
-
const { exports
|
|
46
|
-
return exports
|
|
44
|
+
const { exports } = cjs_module_lexer.parse(source);
|
|
45
|
+
return exports;
|
|
47
46
|
}
|
|
48
47
|
async function vocabLoader(source) {
|
|
49
48
|
trace(`Using vocab loader for ${this.resourcePath}`);
|
|
@@ -91,7 +90,7 @@ async function vocabLoader(source) {
|
|
|
91
90
|
trace("Created translation file", result);
|
|
92
91
|
callback(null, result);
|
|
93
92
|
}
|
|
94
|
-
|
|
95
93
|
//#endregion
|
|
96
94
|
module.exports = vocabLoader;
|
|
95
|
+
|
|
97
96
|
//# sourceMappingURL=loader.cjs.map
|
package/dist/loader.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.cjs","names":["_trace","
|
|
1
|
+
{"version":3,"file":"loader.cjs","names":["_trace","getChunkName","esModuleLexer","cjsModuleLexer"],"sources":["../src/loader.ts"],"sourcesContent":["import path from 'path';\nimport {\n type LoadedTranslation,\n type UserConfig,\n type TranslationMessagesByKey,\n getDevLanguageFileFromTsFile,\n loadTranslation,\n} from '@vocab/core';\nimport * as cjsModuleLexer from 'cjs-module-lexer';\nimport * as esModuleLexer from 'es-module-lexer';\nimport type { LoaderContext as WebpackLoaderContext } from 'webpack';\n\nimport { getChunkName } from './chunk-name';\nimport { trace as _trace } from './logger';\n\ntype LoaderContext = WebpackLoaderContext<UserConfig>;\n\nconst trace = _trace.extend('loader');\n\n// Resolve virtual-resource-loader dependency from current package\nconst virtualResourceLoader = require.resolve('virtual-resource-loader');\n\nfunction createIdentifier(\n lang: string,\n resourcePath: string,\n loadedTranslation: LoadedTranslation,\n) {\n trace('Creating identifier for language', lang);\n const languageTranslations = loadedTranslation.languages[lang] ?? {};\n\n const langJson: TranslationMessagesByKey = {};\n\n for (const key of loadedTranslation.keys) {\n langJson[key] = languageTranslations[key].message;\n }\n\n const base64 = Buffer.from(JSON.stringify(langJson), 'utf-8').toString(\n 'base64',\n );\n\n const unloader = `${virtualResourceLoader}?source=${encodeURIComponent(\n base64,\n )}`;\n const fileIdent = path.basename(resourcePath, 'translations.json');\n\n return `./${fileIdent}-${lang}-virtual.json!=!${unloader}!`;\n}\n\n// reimplement `stringifyRequest` from loader-utils 2.x\n// https://github.com/webpack/loader-utils/blob/master/CHANGELOG.md#300-2021-10-20\nfunction stringifyRequest(this: LoaderContext, request: string) {\n return JSON.stringify(this.utils.contextify(this.context, request));\n}\n\nfunction renderLanguageLoaderAsync(\n this: LoaderContext,\n resourcePath: string,\n loadedTranslation: LoadedTranslation,\n) {\n return (lang: string) => {\n const identifier = stringifyRequest.call(\n this,\n createIdentifier(lang, resourcePath, loadedTranslation),\n );\n\n return /* ts */ `\n createLanguage(\n require.resolveWeak(${identifier}),\n () => import(\n /* webpackChunkName: ${JSON.stringify(getChunkName(lang))} */\n ${identifier}\n )\n )\n `.trim();\n };\n}\n\nfunction findExportNames(source: string, mode: 'cjs'): string[];\nfunction findExportNames(\n source: string,\n mode: 'esm',\n): esModuleLexer.ExportSpecifier[];\nfunction findExportNames(source: string, mode: 'cjs' | 'esm') {\n if (mode === 'esm') {\n const [, exports] = esModuleLexer.parse(source);\n return exports;\n }\n const { exports } = cjsModuleLexer.parse(source);\n return exports;\n}\n\nexport default async function vocabLoader(this: LoaderContext, source: string) {\n trace(`Using vocab loader for ${this.resourcePath}`);\n const callback = this.async();\n\n if (!callback) {\n throw new Error(`Webpack didn't provide an async callback`);\n }\n\n const config = this.getOptions();\n\n const devJsonFilePath = getDevLanguageFileFromTsFile(this.resourcePath);\n\n const loadedTranslation = loadTranslation(\n { filePath: devJsonFilePath, fallbacks: 'all' },\n config,\n );\n\n const target = this.target;\n if (target && target !== 'web') {\n trace(`Why are you using the loader on ${target}?`);\n callback(new Error('Called Vocab Loader with non-web target'));\n return;\n }\n\n const renderLanguageLoader = renderLanguageLoaderAsync.call(\n this,\n devJsonFilePath,\n loadedTranslation,\n );\n\n const translations = /* ts */ `\n const translations = createTranslationFile({\n ${Object.keys(loadedTranslation.languages)\n .map((lang) => `${JSON.stringify(lang)}: ${renderLanguageLoader(lang)}`)\n .join(',\\n')}\n });\n `;\n let result;\n\n // this is necessary for the Web Assembly boot\n await esModuleLexer.init;\n const esmExports = findExportNames(source, 'esm');\n if (esmExports.length > 0) {\n const exportName = esmExports[0];\n trace(`Found ESM export '${exportName.n}' in ${this.resourcePath}`);\n\n result = /* ts */ `\n import { createLanguage, createTranslationFile } from '@vocab/webpack/${target}';\n ${translations}\n export { translations as ${exportName.n} };\n `;\n } else {\n // init needs to be called and waited upon\n await cjsModuleLexer.init();\n\n const exportName = findExportNames(source, 'cjs')[0];\n trace(`Found CJS export '${exportName}' in ${this.resourcePath}`);\n\n result = /* ts */ `\n const { createLanguage, createTranslationFile } = require('@vocab/webpack/${target}');\n ${translations}\n exports.${exportName} = translations;\n `;\n }\n\n trace('Created translation file', result);\n\n callback(null, result);\n}\n"],"mappings":";;;;;;;;;;AAiBA,MAAM,QAAQA,eAAAA,MAAO,OAAO,SAAS;AAGrC,MAAM,wBAAwB,QAAQ,QAAQ,0BAA0B;AAExE,SAAS,iBACP,MACA,cACA,mBACA;AACA,OAAM,oCAAoC,KAAK;CAC/C,MAAM,uBAAuB,kBAAkB,UAAU,SAAS,EAAE;CAEpE,MAAM,WAAqC,EAAE;AAE7C,MAAK,MAAM,OAAO,kBAAkB,KAClC,UAAS,OAAO,qBAAqB,KAAK;CAG5C,MAAM,SAAS,OAAO,KAAK,KAAK,UAAU,SAAS,EAAE,QAAQ,CAAC,SAC5D,SACD;CAED,MAAM,WAAW,GAAG,sBAAsB,UAAU,mBAClD,OACD;AAGD,QAAO,KAFW,KAAA,QAAK,SAAS,cAAc,oBAAoB,CAE5C,GAAG,KAAK,kBAAkB,SAAS;;AAK3D,SAAS,iBAAsC,SAAiB;AAC9D,QAAO,KAAK,UAAU,KAAK,MAAM,WAAW,KAAK,SAAS,QAAQ,CAAC;;AAGrE,SAAS,0BAEP,cACA,mBACA;AACA,SAAQ,SAAiB;EACvB,MAAM,aAAa,iBAAiB,KAClC,MACA,iBAAiB,MAAM,cAAc,kBAAkB,CACxD;AAED,SAAgB;;8BAEU,WAAW;;iCAER,KAAK,UAAUC,mBAAAA,aAAa,KAAK,CAAC,CAAC;YACxD,WAAW;;;MAGjB,MAAM;;;AASZ,SAAS,gBAAgB,QAAgB,MAAqB;AAC5D,KAAI,SAAS,OAAO;EAClB,MAAM,GAAG,WAAWC,gBAAc,MAAM,OAAO;AAC/C,SAAO;;CAET,MAAM,EAAE,YAAYC,iBAAe,MAAM,OAAO;AAChD,QAAO;;AAGT,eAA8B,YAAiC,QAAgB;AAC7E,OAAM,0BAA0B,KAAK,eAAe;CACpD,MAAM,WAAW,KAAK,OAAO;AAE7B,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,2CAA2C;CAG7D,MAAM,SAAS,KAAK,YAAY;CAEhC,MAAM,mBAAA,GAAA,YAAA,8BAA+C,KAAK,aAAa;CAEvE,MAAM,qBAAA,GAAA,YAAA,iBACJ;EAAE,UAAU;EAAiB,WAAW;EAAO,EAC/C,OACD;CAED,MAAM,SAAS,KAAK;AACpB,KAAI,UAAU,WAAW,OAAO;AAC9B,QAAM,mCAAmC,OAAO,GAAG;AACnD,2BAAS,IAAI,MAAM,0CAA0C,CAAC;AAC9D;;CAGF,MAAM,uBAAuB,0BAA0B,KACrD,MACA,iBACA,kBACD;CAED,MAAM,eAAwB;;QAExB,OAAO,KAAK,kBAAkB,UAAU,CACvC,KAAK,SAAS,GAAG,KAAK,UAAU,KAAK,CAAC,IAAI,qBAAqB,KAAK,GAAG,CACvE,KAAK,MAAM,CAAC;;;CAGnB,IAAI;AAGJ,OAAMD,gBAAc;CACpB,MAAM,aAAa,gBAAgB,QAAQ,MAAM;AACjD,KAAI,WAAW,SAAS,GAAG;EACzB,MAAM,aAAa,WAAW;AAC9B,QAAM,qBAAqB,WAAW,EAAE,OAAO,KAAK,eAAe;AAEnE,WAAkB;8EACwD,OAAO;QAC7E,aAAa;iCACY,WAAW,EAAE;;QAErC;AAEL,QAAMC,iBAAe,MAAM;EAE3B,MAAM,aAAa,gBAAgB,QAAQ,MAAM,CAAC;AAClD,QAAM,qBAAqB,WAAW,OAAO,KAAK,eAAe;AAEjE,WAAkB;kFAC4D,OAAO;QACjF,aAAa;gBACL,WAAW;;;AAIzB,OAAM,4BAA4B,OAAO;AAEzC,UAAS,MAAM,OAAO"}
|
package/dist/loader.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { n as __require, t as trace$1 } from "./logger-
|
|
1
|
+
import { n as __require, t as trace$1 } from "./logger-Cr8WnlLB.mjs";
|
|
2
2
|
import { getChunkName } from "./chunk-name.mjs";
|
|
3
3
|
import { getDevLanguageFileFromTsFile, loadTranslation } from "@vocab/core";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import * as cjsModuleLexer from "cjs-module-lexer";
|
|
6
6
|
import * as esModuleLexer from "es-module-lexer";
|
|
7
|
-
|
|
8
7
|
//#region src/loader.ts
|
|
9
8
|
const trace = trace$1.extend("loader");
|
|
10
9
|
const virtualResourceLoader = __require.resolve("virtual-resource-loader");
|
|
@@ -36,8 +35,8 @@ function renderLanguageLoaderAsync(resourcePath, loadedTranslation) {
|
|
|
36
35
|
}
|
|
37
36
|
function findExportNames(source, mode) {
|
|
38
37
|
if (mode === "esm") {
|
|
39
|
-
const [, exports
|
|
40
|
-
return exports
|
|
38
|
+
const [, exports] = esModuleLexer.parse(source);
|
|
39
|
+
return exports;
|
|
41
40
|
}
|
|
42
41
|
const { exports } = cjsModuleLexer.parse(source);
|
|
43
42
|
return exports;
|
|
@@ -88,7 +87,7 @@ async function vocabLoader(source) {
|
|
|
88
87
|
trace("Created translation file", result);
|
|
89
88
|
callback(null, result);
|
|
90
89
|
}
|
|
91
|
-
|
|
92
90
|
//#endregion
|
|
93
91
|
export { vocabLoader as default };
|
|
92
|
+
|
|
94
93
|
//# sourceMappingURL=loader.mjs.map
|
package/dist/loader.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.mjs","names":["_trace"
|
|
1
|
+
{"version":3,"file":"loader.mjs","names":["_trace"],"sources":["../src/loader.ts"],"sourcesContent":["import path from 'path';\nimport {\n type LoadedTranslation,\n type UserConfig,\n type TranslationMessagesByKey,\n getDevLanguageFileFromTsFile,\n loadTranslation,\n} from '@vocab/core';\nimport * as cjsModuleLexer from 'cjs-module-lexer';\nimport * as esModuleLexer from 'es-module-lexer';\nimport type { LoaderContext as WebpackLoaderContext } from 'webpack';\n\nimport { getChunkName } from './chunk-name';\nimport { trace as _trace } from './logger';\n\ntype LoaderContext = WebpackLoaderContext<UserConfig>;\n\nconst trace = _trace.extend('loader');\n\n// Resolve virtual-resource-loader dependency from current package\nconst virtualResourceLoader = require.resolve('virtual-resource-loader');\n\nfunction createIdentifier(\n lang: string,\n resourcePath: string,\n loadedTranslation: LoadedTranslation,\n) {\n trace('Creating identifier for language', lang);\n const languageTranslations = loadedTranslation.languages[lang] ?? {};\n\n const langJson: TranslationMessagesByKey = {};\n\n for (const key of loadedTranslation.keys) {\n langJson[key] = languageTranslations[key].message;\n }\n\n const base64 = Buffer.from(JSON.stringify(langJson), 'utf-8').toString(\n 'base64',\n );\n\n const unloader = `${virtualResourceLoader}?source=${encodeURIComponent(\n base64,\n )}`;\n const fileIdent = path.basename(resourcePath, 'translations.json');\n\n return `./${fileIdent}-${lang}-virtual.json!=!${unloader}!`;\n}\n\n// reimplement `stringifyRequest` from loader-utils 2.x\n// https://github.com/webpack/loader-utils/blob/master/CHANGELOG.md#300-2021-10-20\nfunction stringifyRequest(this: LoaderContext, request: string) {\n return JSON.stringify(this.utils.contextify(this.context, request));\n}\n\nfunction renderLanguageLoaderAsync(\n this: LoaderContext,\n resourcePath: string,\n loadedTranslation: LoadedTranslation,\n) {\n return (lang: string) => {\n const identifier = stringifyRequest.call(\n this,\n createIdentifier(lang, resourcePath, loadedTranslation),\n );\n\n return /* ts */ `\n createLanguage(\n require.resolveWeak(${identifier}),\n () => import(\n /* webpackChunkName: ${JSON.stringify(getChunkName(lang))} */\n ${identifier}\n )\n )\n `.trim();\n };\n}\n\nfunction findExportNames(source: string, mode: 'cjs'): string[];\nfunction findExportNames(\n source: string,\n mode: 'esm',\n): esModuleLexer.ExportSpecifier[];\nfunction findExportNames(source: string, mode: 'cjs' | 'esm') {\n if (mode === 'esm') {\n const [, exports] = esModuleLexer.parse(source);\n return exports;\n }\n const { exports } = cjsModuleLexer.parse(source);\n return exports;\n}\n\nexport default async function vocabLoader(this: LoaderContext, source: string) {\n trace(`Using vocab loader for ${this.resourcePath}`);\n const callback = this.async();\n\n if (!callback) {\n throw new Error(`Webpack didn't provide an async callback`);\n }\n\n const config = this.getOptions();\n\n const devJsonFilePath = getDevLanguageFileFromTsFile(this.resourcePath);\n\n const loadedTranslation = loadTranslation(\n { filePath: devJsonFilePath, fallbacks: 'all' },\n config,\n );\n\n const target = this.target;\n if (target && target !== 'web') {\n trace(`Why are you using the loader on ${target}?`);\n callback(new Error('Called Vocab Loader with non-web target'));\n return;\n }\n\n const renderLanguageLoader = renderLanguageLoaderAsync.call(\n this,\n devJsonFilePath,\n loadedTranslation,\n );\n\n const translations = /* ts */ `\n const translations = createTranslationFile({\n ${Object.keys(loadedTranslation.languages)\n .map((lang) => `${JSON.stringify(lang)}: ${renderLanguageLoader(lang)}`)\n .join(',\\n')}\n });\n `;\n let result;\n\n // this is necessary for the Web Assembly boot\n await esModuleLexer.init;\n const esmExports = findExportNames(source, 'esm');\n if (esmExports.length > 0) {\n const exportName = esmExports[0];\n trace(`Found ESM export '${exportName.n}' in ${this.resourcePath}`);\n\n result = /* ts */ `\n import { createLanguage, createTranslationFile } from '@vocab/webpack/${target}';\n ${translations}\n export { translations as ${exportName.n} };\n `;\n } else {\n // init needs to be called and waited upon\n await cjsModuleLexer.init();\n\n const exportName = findExportNames(source, 'cjs')[0];\n trace(`Found CJS export '${exportName}' in ${this.resourcePath}`);\n\n result = /* ts */ `\n const { createLanguage, createTranslationFile } = require('@vocab/webpack/${target}');\n ${translations}\n exports.${exportName} = translations;\n `;\n }\n\n trace('Created translation file', result);\n\n callback(null, result);\n}\n"],"mappings":";;;;;;;AAiBA,MAAM,QAAQA,QAAO,OAAO,SAAS;AAGrC,MAAM,wBAAA,UAAgC,QAAQ,0BAA0B;AAExE,SAAS,iBACP,MACA,cACA,mBACA;AACA,OAAM,oCAAoC,KAAK;CAC/C,MAAM,uBAAuB,kBAAkB,UAAU,SAAS,EAAE;CAEpE,MAAM,WAAqC,EAAE;AAE7C,MAAK,MAAM,OAAO,kBAAkB,KAClC,UAAS,OAAO,qBAAqB,KAAK;CAG5C,MAAM,SAAS,OAAO,KAAK,KAAK,UAAU,SAAS,EAAE,QAAQ,CAAC,SAC5D,SACD;CAED,MAAM,WAAW,GAAG,sBAAsB,UAAU,mBAClD,OACD;AAGD,QAAO,KAFW,KAAK,SAAS,cAAc,oBAAoB,CAE5C,GAAG,KAAK,kBAAkB,SAAS;;AAK3D,SAAS,iBAAsC,SAAiB;AAC9D,QAAO,KAAK,UAAU,KAAK,MAAM,WAAW,KAAK,SAAS,QAAQ,CAAC;;AAGrE,SAAS,0BAEP,cACA,mBACA;AACA,SAAQ,SAAiB;EACvB,MAAM,aAAa,iBAAiB,KAClC,MACA,iBAAiB,MAAM,cAAc,kBAAkB,CACxD;AAED,SAAgB;;8BAEU,WAAW;;iCAER,KAAK,UAAU,aAAa,KAAK,CAAC,CAAC;YACxD,WAAW;;;MAGjB,MAAM;;;AASZ,SAAS,gBAAgB,QAAgB,MAAqB;AAC5D,KAAI,SAAS,OAAO;EAClB,MAAM,GAAG,WAAW,cAAc,MAAM,OAAO;AAC/C,SAAO;;CAET,MAAM,EAAE,YAAY,eAAe,MAAM,OAAO;AAChD,QAAO;;AAGT,eAA8B,YAAiC,QAAgB;AAC7E,OAAM,0BAA0B,KAAK,eAAe;CACpD,MAAM,WAAW,KAAK,OAAO;AAE7B,KAAI,CAAC,SACH,OAAM,IAAI,MAAM,2CAA2C;CAG7D,MAAM,SAAS,KAAK,YAAY;CAEhC,MAAM,kBAAkB,6BAA6B,KAAK,aAAa;CAEvE,MAAM,oBAAoB,gBACxB;EAAE,UAAU;EAAiB,WAAW;EAAO,EAC/C,OACD;CAED,MAAM,SAAS,KAAK;AACpB,KAAI,UAAU,WAAW,OAAO;AAC9B,QAAM,mCAAmC,OAAO,GAAG;AACnD,2BAAS,IAAI,MAAM,0CAA0C,CAAC;AAC9D;;CAGF,MAAM,uBAAuB,0BAA0B,KACrD,MACA,iBACA,kBACD;CAED,MAAM,eAAwB;;QAExB,OAAO,KAAK,kBAAkB,UAAU,CACvC,KAAK,SAAS,GAAG,KAAK,UAAU,KAAK,CAAC,IAAI,qBAAqB,KAAK,GAAG,CACvE,KAAK,MAAM,CAAC;;;CAGnB,IAAI;AAGJ,OAAM,cAAc;CACpB,MAAM,aAAa,gBAAgB,QAAQ,MAAM;AACjD,KAAI,WAAW,SAAS,GAAG;EACzB,MAAM,aAAa,WAAW;AAC9B,QAAM,qBAAqB,WAAW,EAAE,OAAO,KAAK,eAAe;AAEnE,WAAkB;8EACwD,OAAO;QAC7E,aAAa;iCACY,WAAW,EAAE;;QAErC;AAEL,QAAM,eAAe,MAAM;EAE3B,MAAM,aAAa,gBAAgB,QAAQ,MAAM,CAAC;AAClD,QAAM,qBAAqB,WAAW,OAAO,KAAK,eAAe;AAEjE,WAAkB;kFAC4D,OAAO;QACjF,aAAa;gBACL,WAAW;;;AAIzB,OAAM,4BAA4B,OAAO;AAEzC,UAAS,MAAM,OAAO"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import "picocolors";
|
|
3
3
|
import debug from "debug";
|
|
4
|
-
|
|
5
|
-
//#region rolldown:runtime
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
6
5
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
7
|
-
|
|
8
6
|
//#endregion
|
|
9
7
|
//#region src/logger.ts
|
|
10
8
|
const trace = debug(`vocab:webpack`);
|
|
11
|
-
|
|
12
9
|
//#endregion
|
|
13
10
|
export { __require as n, trace as t };
|
|
14
|
-
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=logger-Cr8WnlLB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-
|
|
1
|
+
{"version":3,"file":"logger-Cr8WnlLB.mjs","names":[],"sources":["../src/logger.ts"],"sourcesContent":["import pc from 'picocolors';\nimport debug from 'debug';\n\nexport const trace = debug(`vocab:webpack`);\n\nexport const log = (...params: unknown[]) => {\n // eslint-disable-next-line no-console\n console.log(pc.yellow('Vocab'), ...params);\n};\n"],"mappings":";;;;;;;AAGA,MAAa,QAAQ,MAAM,gBAAgB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -6,16 +6,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
19
15
|
}
|
|
20
16
|
return to;
|
|
21
17
|
};
|
|
@@ -23,26 +19,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
19
|
value: mod,
|
|
24
20
|
enumerable: true
|
|
25
21
|
}) : target, mod));
|
|
26
|
-
|
|
27
22
|
//#endregion
|
|
28
23
|
require("picocolors");
|
|
29
24
|
let debug = require("debug");
|
|
30
25
|
debug = __toESM(debug);
|
|
31
|
-
|
|
32
26
|
//#region src/logger.ts
|
|
33
27
|
const trace = (0, debug.default)(`vocab:webpack`);
|
|
34
|
-
|
|
35
28
|
//#endregion
|
|
36
|
-
Object.defineProperty(exports,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
Object.defineProperty(exports, "__toESM", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function() {
|
|
32
|
+
return __toESM;
|
|
33
|
+
}
|
|
41
34
|
});
|
|
42
|
-
Object.defineProperty(exports,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
Object.defineProperty(exports, "trace", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function() {
|
|
38
|
+
return trace;
|
|
39
|
+
}
|
|
47
40
|
});
|
|
48
|
-
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=logger-Djpeczm2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-
|
|
1
|
+
{"version":3,"file":"logger-Djpeczm2.cjs","names":[],"sources":["../src/logger.ts"],"sourcesContent":["import pc from 'picocolors';\nimport debug from 'debug';\n\nexport const trace = debug(`vocab:webpack`);\n\nexport const log = (...params: unknown[]) => {\n // eslint-disable-next-line no-console\n console.log(pc.yellow('Vocab'), ...params);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAa,SAAA,GAAA,MAAA,SAAc,gBAAgB"}
|
package/dist/web.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("./logger-Djpeczm2.cjs");
|
|
2
3
|
let _vocab_core_icu_handler = require("@vocab/core/icu-handler");
|
|
3
4
|
let _vocab_core_translation_file = require("@vocab/core/translation-file");
|
|
4
|
-
|
|
5
5
|
//#region src/web.ts
|
|
6
6
|
const createLanguage = (moduleId, loadImport) => {
|
|
7
7
|
let promiseValue;
|
|
@@ -16,13 +16,13 @@ const createLanguage = (moduleId, loadImport) => {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
|
|
20
19
|
//#endregion
|
|
21
20
|
exports.createLanguage = createLanguage;
|
|
22
|
-
Object.defineProperty(exports,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
Object.defineProperty(exports, "createTranslationFile", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return _vocab_core_translation_file.createTranslationFile;
|
|
25
|
+
}
|
|
27
26
|
});
|
|
27
|
+
|
|
28
28
|
//# sourceMappingURL=web.cjs.map
|
package/dist/web.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.cjs","names":[
|
|
1
|
+
{"version":3,"file":"web.cjs","names":[],"sources":["../src/web.ts"],"sourcesContent":["import type { TranslationModule, TranslationMessagesByKey } from '@vocab/core';\nimport { getParsedICUMessages } from '@vocab/core/icu-handler';\n\nexport { createTranslationFile } from '@vocab/core/translation-file';\n\nexport const createLanguage = (\n moduleId: string,\n loadImport: () => Promise<any>,\n): TranslationModule<any> => {\n let promiseValue: Promise<any>;\n\n return {\n getValue: (locale) => {\n // @ts-expect-error Missing webpack types\n if (!__webpack_modules__[moduleId]) {\n return undefined;\n }\n\n // @ts-expect-error Missing webpack types\n const m = __webpack_require__(moduleId) as TranslationMessagesByKey;\n\n return getParsedICUMessages(m, locale);\n },\n load: () => {\n if (!promiseValue) {\n promiseValue = loadImport();\n }\n return promiseValue;\n },\n };\n};\n"],"mappings":";;;;;AAKA,MAAa,kBACX,UACA,eAC2B;CAC3B,IAAI;AAEJ,QAAO;EACL,WAAW,WAAW;AAEpB,OAAI,CAAC,oBAAoB,UACvB;AAMF,WAAA,GAAA,wBAAA,sBAFU,oBAAoB,SAAS,EAER,OAAO;;EAExC,YAAY;AACV,OAAI,CAAC,aACH,gBAAe,YAAY;AAE7B,UAAO;;EAEV"}
|
package/dist/web.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getParsedICUMessages } from "@vocab/core/icu-handler";
|
|
2
2
|
import { createTranslationFile } from "@vocab/core/translation-file";
|
|
3
|
-
|
|
4
3
|
//#region src/web.ts
|
|
5
4
|
const createLanguage = (moduleId, loadImport) => {
|
|
6
5
|
let promiseValue;
|
|
@@ -15,7 +14,7 @@ const createLanguage = (moduleId, loadImport) => {
|
|
|
15
14
|
}
|
|
16
15
|
};
|
|
17
16
|
};
|
|
18
|
-
|
|
19
17
|
//#endregion
|
|
20
18
|
export { createLanguage, createTranslationFile };
|
|
19
|
+
|
|
21
20
|
//# sourceMappingURL=web.mjs.map
|
package/dist/web.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.mjs","names":[
|
|
1
|
+
{"version":3,"file":"web.mjs","names":[],"sources":["../src/web.ts"],"sourcesContent":["import type { TranslationModule, TranslationMessagesByKey } from '@vocab/core';\nimport { getParsedICUMessages } from '@vocab/core/icu-handler';\n\nexport { createTranslationFile } from '@vocab/core/translation-file';\n\nexport const createLanguage = (\n moduleId: string,\n loadImport: () => Promise<any>,\n): TranslationModule<any> => {\n let promiseValue: Promise<any>;\n\n return {\n getValue: (locale) => {\n // @ts-expect-error Missing webpack types\n if (!__webpack_modules__[moduleId]) {\n return undefined;\n }\n\n // @ts-expect-error Missing webpack types\n const m = __webpack_require__(moduleId) as TranslationMessagesByKey;\n\n return getParsedICUMessages(m, locale);\n },\n load: () => {\n if (!promiseValue) {\n promiseValue = loadImport();\n }\n return promiseValue;\n },\n };\n};\n"],"mappings":";;;AAKA,MAAa,kBACX,UACA,eAC2B;CAC3B,IAAI;AAEJ,QAAO;EACL,WAAW,WAAW;AAEpB,OAAI,CAAC,oBAAoB,UACvB;AAMF,UAAO,qBAFG,oBAAoB,SAAS,EAER,OAAO;;EAExC,YAAY;AACV,OAAI,CAAC,aACH,gBAAe,YAAY;AAE7B,UAAO;;EAEV"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocab/webpack",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.23",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/seek-oss/vocab.git",
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
"types": "./dist/index.d.cts",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"import": "./dist/index.mjs",
|
|
15
|
+
"require": "./dist/index.cjs"
|
|
16
16
|
},
|
|
17
17
|
"./chunk-name": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"import": "./dist/chunk-name.mjs",
|
|
19
|
+
"require": "./dist/chunk-name.cjs"
|
|
20
20
|
},
|
|
21
21
|
"./loader": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"import": "./dist/loader.mjs",
|
|
23
|
+
"require": "./dist/loader.cjs"
|
|
24
24
|
},
|
|
25
25
|
"./web": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"import": "./dist/web.mjs",
|
|
27
|
+
"require": "./dist/web.cjs"
|
|
28
28
|
},
|
|
29
29
|
"./package.json": "./package.json"
|
|
30
30
|
},
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"cjs-module-lexer": "^2.0.0",
|
|
38
38
|
"debug": "^4.3.1",
|
|
39
|
-
"es-module-lexer": "^
|
|
39
|
+
"es-module-lexer": "^2.0.0",
|
|
40
40
|
"picocolors": "^1.0.0",
|
|
41
|
-
"@vocab/core": "^1.
|
|
41
|
+
"@vocab/core": "^1.8.0",
|
|
42
42
|
"virtual-resource-loader": "^2.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|