mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore: configure absolute paths with webpack (#3011)
* coonfigure absolute paths with webpack resolves #1855 * fixed jest config
This commit is contained in:
@ -27,7 +27,7 @@ module.exports = {
|
||||
testEnvironment: "jsdom",
|
||||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
||||
testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes", "/e2e/"],
|
||||
moduleDirectories: ["node_modules", "<rootDir>"],
|
||||
moduleDirectories: ["node_modules", "<rootDir>/src"],
|
||||
moduleNameMapper: {
|
||||
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
|
||||
},
|
||||
|
@ -2,9 +2,9 @@ import { useMachine } from "@xstate/react"
|
||||
import { FC, useEffect } from "react"
|
||||
import { Helmet } from "react-helmet"
|
||||
import { useSearchParams } from "react-router-dom"
|
||||
import { workspaceFilterQuery } from "../../util/filters"
|
||||
import { pageTitle } from "../../util/page"
|
||||
import { workspacesMachine } from "../../xServices/workspaces/workspacesXService"
|
||||
import { workspaceFilterQuery } from "util/filters"
|
||||
import { pageTitle } from "util/page"
|
||||
import { workspacesMachine } from "xServices/workspaces/workspacesXService"
|
||||
import { WorkspacesPageView } from "./WorkspacesPageView"
|
||||
|
||||
const WorkspacesPage: FC = () => {
|
||||
|
@ -13,7 +13,8 @@
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "es2018"
|
||||
"target": "es2018",
|
||||
"baseUrl": "./src"
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules", "_jest"]
|
||||
|
@ -103,6 +103,7 @@ export const createCommonWebpackConfig = (options?: { skipTypecheck: boolean }):
|
||||
//
|
||||
// See: https://webpack.js.org/guides/typescript/
|
||||
extensions: [".tsx", ".ts", ".js"],
|
||||
modules: [path.resolve(__dirname, "src"), "node_modules"],
|
||||
},
|
||||
|
||||
// plugins customize the build process
|
||||
|
Reference in New Issue
Block a user