mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Add typescript
(cherry picked from commit 910511dba03196f14bb238c8e15f060c12183c08)
This commit is contained in:
parent
f38f00c64e
commit
eacaf9be32
17 changed files with 635 additions and 38 deletions
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const FileManagerPlugin = require('filemanager-webpack-plugin');
|
||||
|
@ -5,6 +6,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||
const LiveReloadPlugin = require('webpack-livereload-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
|
||||
module.exports = (env) => {
|
||||
const uiFolder = 'UI';
|
||||
|
@ -38,6 +40,11 @@ module.exports = (env) => {
|
|||
},
|
||||
|
||||
resolve: {
|
||||
extensions: [
|
||||
'.ts',
|
||||
'.tsx',
|
||||
'.js'
|
||||
],
|
||||
modules: [
|
||||
srcFolder,
|
||||
path.join(srcFolder, 'Shims'),
|
||||
|
@ -131,6 +138,8 @@ module.exports = (env) => {
|
|||
}
|
||||
}),
|
||||
|
||||
new ForkTsCheckerWebpackPlugin(),
|
||||
|
||||
new LiveReloadPlugin()
|
||||
],
|
||||
|
||||
|
@ -154,7 +163,7 @@ module.exports = (env) => {
|
|||
}
|
||||
},
|
||||
{
|
||||
test: /\.js?$/,
|
||||
test: [/\.jsx?$/, /\.tsx?$/],
|
||||
exclude: /(node_modules|JsLibraries)/,
|
||||
use: [
|
||||
{
|
||||
|
@ -185,6 +194,7 @@ module.exports = (env) => {
|
|||
exclude: /(node_modules|globals.css)/,
|
||||
use: [
|
||||
{ loader: MiniCssExtractPlugin.loader },
|
||||
{ loader: 'css-modules-typescript-loader' },
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue