about summary refs log tree commit diff
path: root/config/webpack
diff options
context:
space:
mode:
Diffstat (limited to 'config/webpack')
-rw-r--r--config/webpack/generateLocalePacks.js8
-rw-r--r--config/webpack/rules/babel.js2
-rw-r--r--config/webpack/shared.js2
3 files changed, 6 insertions, 6 deletions
diff --git a/config/webpack/generateLocalePacks.js b/config/webpack/generateLocalePacks.js
index b1b818159..fedf0c7a1 100644
--- a/config/webpack/generateLocalePacks.js
+++ b/config/webpack/generateLocalePacks.js
@@ -13,7 +13,7 @@ const { existsSync, readdirSync, writeFileSync } = require('fs');
 const { join, resolve } = require('path');
 const rimraf = require('rimraf');
 const mkdirp = require('mkdirp');
-const { flavours } = require('./configuration.js');
+const { flavours } = require('./configuration');
 
 module.exports = Object.keys(flavours).reduce(function (map, entry) {
   const flavour = flavours[entry];
@@ -43,13 +43,13 @@ module.exports = Object.keys(flavours).reduce(function (map, entry) {
       // first try react-intl
       `node_modules/react-intl/locale-data/${baseLocale}.js`,
       // then check locales/locale-data
-      `app/javascript/locales/locale-data/${baseLocale}.js`,
+      `app/javascript/mastodon/locales/locale-data/${baseLocale}.js`,
       // fall back to English (this is what react-intl does anyway)
       'node_modules/react-intl/locale-data/en.js',
     ].filter(
-      filename => existsSync(filename)
+      filename => existsSync(filename),
     ).map(
-      filename => filename.replace(/(?:node_modules|app\/javascript)\//, '')
+      filename => filename.replace(/(?:node_modules|app\/javascript)\//, ''),
     )[0];
     const localeContent = `//
 // locales/${entry}/${locale}.js
diff --git a/config/webpack/rules/babel.js b/config/webpack/rules/babel.js
index 4d25748ee..8b6205a5c 100644
--- a/config/webpack/rules/babel.js
+++ b/config/webpack/rules/babel.js
@@ -2,7 +2,7 @@ const { join, resolve } = require('path');
 const { env, settings } = require('../configuration');
 
 module.exports = {
-  test: /\.(js|jsx|mjs)$/,
+  test: /\.(js|jsx|mjs|ts|tsx)$/,
   include: [
     settings.source_path,
     ...settings.resolved_paths,
diff --git a/config/webpack/shared.js b/config/webpack/shared.js
index bbf9f51f1..405858d0c 100644
--- a/config/webpack/shared.js
+++ b/config/webpack/shared.js
@@ -81,7 +81,7 @@ module.exports = {
           },
           minChunks: 2,
           minSize: 0,
-          test: /^(?!.*[\\\/]node_modules[\\\/]react-intl[\\\/]).+$/,
+          test: /^(?!.*[\\/]node_modules[\\/]react-intl[\\/]).+$/,
         },
       },
     },