Skip to content

Commit

Permalink
#27 - feat: add optional internationalization support through react…
Browse files Browse the repository at this point in the history
…-intl
  • Loading branch information
svenvandescheur committed Feb 9, 2024
1 parent 85e2c8c commit 22d66f4
Show file tree
Hide file tree
Showing 27 changed files with 1,348 additions and 395 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"browser": true,
"es2021": true
},
"ignorePatterns": ["*.config.js", "dist/**/*", "**/*.css", "**/*.scss", "**/*.md"],
"ignorePatterns": ["*.js", "*.config.js", "dist/**/*", "**/*.css", "**/*.scss", "**/*.md"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
Expand Down
22 changes: 21 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { transform } from "@formatjs/ts-transformer";
import type { StorybookConfig } from "@storybook/react-webpack5";
import * as path from "path";

Expand All @@ -6,7 +7,6 @@ const config: StorybookConfig = {
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
],
core: {
Expand All @@ -29,6 +29,26 @@ const config: StorybookConfig = {
use: ["style-loader", "css-loader", "sass-loader"],
include: path.resolve(__dirname, "../"),
});
config.module.rules.push({
test: /\.tsx?$/,
use: [
{
loader: "ts-loader",
options: {
getCustomTransformers() {
return {
before: [
transform({
overrideIdFn: "[sha512:contenthash:base64:6]",
}),
],
};
},
},
},
],
exclude: /node_modules/,
});

// Add any other webpack config modifications here

Expand Down
2 changes: 2 additions & 0 deletions .storybook/preview-body.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
margin: 0;
}
</style>
<!-- Uncomment next line for Dutch translations. -->
<!--<script>document.documentElement.lang = "nl";</script>-->
Loading

0 comments on commit 22d66f4

Please sign in to comment.