summaryrefslogtreecommitdiff
path: root/webpack/module/rules
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-10-07 06:58:50 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-10-07 06:58:50 +0900
commitfe98dd927de6906671dfd3aa9671080ab6a065c6 (patch)
treed8216b495d05fb1b3a015da39996a76c3065636a /webpack/module/rules
parent:v: (diff)
downloadsharkey-fe98dd927de6906671dfd3aa9671080ab6a065c6.tar.gz
sharkey-fe98dd927de6906671dfd3aa9671080ab6a065c6.tar.bz2
sharkey-fe98dd927de6906671dfd3aa9671080ab6a065c6.zip
:v:
Diffstat (limited to 'webpack/module/rules')
-rw-r--r--webpack/module/rules/index.ts4
-rw-r--r--webpack/module/rules/typescript.ts8
2 files changed, 11 insertions, 1 deletions
diff --git a/webpack/module/rules/index.ts b/webpack/module/rules/index.ts
index 2308f4e535..2707a9c2f1 100644
--- a/webpack/module/rules/index.ts
+++ b/webpack/module/rules/index.ts
@@ -2,10 +2,12 @@ import i18n from './i18n';
import themeColor from './theme-color';
import tag from './tag';
import stylus from './stylus';
+import typescript from './typescript';
export default (lang, locale) => [
i18n(lang, locale),
themeColor(),
tag(),
- stylus()
+ stylus(),
+ typescript()
];
diff --git a/webpack/module/rules/typescript.ts b/webpack/module/rules/typescript.ts
new file mode 100644
index 0000000000..eb2b279a55
--- /dev/null
+++ b/webpack/module/rules/typescript.ts
@@ -0,0 +1,8 @@
+/**
+ * TypeScript
+ */
+
+export default () => ({
+ test: /\.ts$/,
+ use: 'awesome-typescript-loader'
+});