mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-23 05:59:54 +00:00
Add support for absolute imports
This commit is contained in:
parent
5da08475cc
commit
c4f5f18812
20
.eslintrc.js
20
.eslintrc.js
@ -88,15 +88,23 @@ module.exports = {
|
|||||||
react: {
|
react: {
|
||||||
version: 'detect'
|
version: 'detect'
|
||||||
},
|
},
|
||||||
'import/extensions': [
|
|
||||||
'.js',
|
|
||||||
'.ts',
|
|
||||||
'.jsx',
|
|
||||||
'.tsx'
|
|
||||||
],
|
|
||||||
'import/parsers': {
|
'import/parsers': {
|
||||||
'@typescript-eslint/parser': [ '.ts', '.tsx' ]
|
'@typescript-eslint/parser': [ '.ts', '.tsx' ]
|
||||||
},
|
},
|
||||||
|
'import/resolver': {
|
||||||
|
node: {
|
||||||
|
extensions: [
|
||||||
|
'.js',
|
||||||
|
'.ts',
|
||||||
|
'.jsx',
|
||||||
|
'.tsx'
|
||||||
|
],
|
||||||
|
moduleDirectory: [
|
||||||
|
'node_modules',
|
||||||
|
'src'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
polyfills: [
|
polyfills: [
|
||||||
// Native Promises Only
|
// Native Promises Only
|
||||||
'Promise',
|
'Promise',
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"baseUrl": "src",
|
||||||
"target": "ES5",
|
"target": "ES5",
|
||||||
"lib": ["DOM", "DOM.Iterable", "ES2015"],
|
"lib": ["DOM", "DOM.Iterable", "ES2015"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
|
@ -31,6 +31,7 @@ const config = {
|
|||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.tsx', '.ts', '.js'],
|
extensions: ['.tsx', '.ts', '.js'],
|
||||||
modules: [
|
modules: [
|
||||||
|
path.resolve(__dirname, 'src'),
|
||||||
path.resolve(__dirname, 'node_modules')
|
path.resolve(__dirname, 'node_modules')
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user