mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +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",
|
testEnvironment: "jsdom",
|
||||||
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
||||||
testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes", "/e2e/"],
|
testPathIgnorePatterns: ["/node_modules/", "/__tests__/fakes", "/e2e/"],
|
||||||
moduleDirectories: ["node_modules", "<rootDir>"],
|
moduleDirectories: ["node_modules", "<rootDir>/src"],
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
|
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
|
||||||
},
|
},
|
||||||
|
@ -2,9 +2,9 @@ import { useMachine } from "@xstate/react"
|
|||||||
import { FC, useEffect } from "react"
|
import { FC, useEffect } from "react"
|
||||||
import { Helmet } from "react-helmet"
|
import { Helmet } from "react-helmet"
|
||||||
import { useSearchParams } from "react-router-dom"
|
import { useSearchParams } from "react-router-dom"
|
||||||
import { workspaceFilterQuery } from "../../util/filters"
|
import { workspaceFilterQuery } from "util/filters"
|
||||||
import { pageTitle } from "../../util/page"
|
import { pageTitle } from "util/page"
|
||||||
import { workspacesMachine } from "../../xServices/workspaces/workspacesXService"
|
import { workspacesMachine } from "xServices/workspaces/workspacesXService"
|
||||||
import { WorkspacesPageView } from "./WorkspacesPageView"
|
import { WorkspacesPageView } from "./WorkspacesPageView"
|
||||||
|
|
||||||
const WorkspacesPage: FC = () => {
|
const WorkspacesPage: FC = () => {
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"target": "es2018"
|
"target": "es2018",
|
||||||
|
"baseUrl": "./src"
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "**/*.tsx"],
|
"include": ["**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules", "_jest"]
|
"exclude": ["node_modules", "_jest"]
|
||||||
|
@ -103,6 +103,7 @@ export const createCommonWebpackConfig = (options?: { skipTypecheck: boolean }):
|
|||||||
//
|
//
|
||||||
// See: https://webpack.js.org/guides/typescript/
|
// See: https://webpack.js.org/guides/typescript/
|
||||||
extensions: [".tsx", ".ts", ".js"],
|
extensions: [".tsx", ".ts", ".js"],
|
||||||
|
modules: [path.resolve(__dirname, "src"), "node_modules"],
|
||||||
},
|
},
|
||||||
|
|
||||||
// plugins customize the build process
|
// plugins customize the build process
|
||||||
|
Reference in New Issue
Block a user