mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Configure webpack to resolve tsconfig aliases; set said aliases
This commit is contained in:
@@ -3,8 +3,12 @@
|
||||
"compilerOptions": {
|
||||
"target": "es2016",
|
||||
"module": "es6",
|
||||
"baseUrl": "./src",
|
||||
"baseUrl": ".",
|
||||
|
||||
"paths": {
|
||||
"@/*": ["src/*"],
|
||||
"@tests/*": ["tests/*"]
|
||||
},
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
|
||||
@@ -14,5 +18,5 @@
|
||||
"vueCompilerOptions": {
|
||||
"target": 2.7
|
||||
},
|
||||
"include": ["./types/*.d.ts", "./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.vue", "./tests/**/*.ts"],
|
||||
"include": ["./types/*.d.ts", "./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.vue", "./tests/**/*.ts"]
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
const DuplicatePackageCheckerPlugin = require("@cerner/duplicate-package-checker-webpack-plugin");
|
||||
const { DumpMetaPlugin } = require("dumpmeta-webpack-plugin");
|
||||
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
|
||||
|
||||
const scriptsBase = path.join(__dirname, "src");
|
||||
const testsBase = path.join(__dirname, "tests");
|
||||
@@ -43,6 +44,7 @@ module.exports = (env = {}, argv = {}) => {
|
||||
filename: "[name].bundled.js",
|
||||
},
|
||||
resolve: {
|
||||
plugins: [new TsconfigPathsPlugin({ extensions: [".ts", ".js", ".json", ".vue", ".scss"] })],
|
||||
extensions: [".ts", ".js", ".json", ".vue", ".scss"],
|
||||
modules: [scriptsBase, "node_modules", styleBase, testsBase],
|
||||
fallback: {
|
||||
|
||||
Reference in New Issue
Block a user