Skip to content

Commit

Permalink
Merge pull request #3478 from iclanton/allow-to-be-webpacked
Browse files Browse the repository at this point in the history
[localization-utilities] Allow localization-utilities to be webpacked.
  • Loading branch information
iclanton authored Jun 16, 2022
2 parents be3b723 + 5b43580 commit f5db603
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/localization-utilities",
"comment": "Allow the package to be webpacked.",
"type": "patch"
}
],
"packageName": "@rushstack/localization-utilities"
}
6 changes: 2 additions & 4 deletions libraries/localization-utilities/src/parsers/parseLocJson.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.

import { resolve } from 'path';

import { JsonFile, JsonSchema } from '@rushstack/node-core-library';

import { ILocalizationFile, IParseFileOptions } from '../interfaces';

const LOC_JSON_SCHEMA_PATH: string = resolve(__dirname, '../schemas/locJson.schema.json');
const LOC_JSON_SCHEMA: JsonSchema = JsonSchema.fromFile(LOC_JSON_SCHEMA_PATH);
// Use `require` here to allow this package to be bundled with Webpack.
const LOC_JSON_SCHEMA: JsonSchema = JsonSchema.fromLoadedObject(require('../schemas/locJson.schema.json'));

/**
* @public
Expand Down

0 comments on commit f5db603

Please sign in to comment.