Skip to content

Commit 6580e05

Browse files
committed
🚧 fixes module.scss
1 parent dc71268 commit 6580e05

File tree

8 files changed

+1014
-17214
lines changed

8 files changed

+1014
-17214
lines changed

declaration.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.module.scss' {
2+
const classes: { [key: string]: string };
3+
export default classes;
4+
}

package-lock.json

Lines changed: 983 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
"@babel/core": "^7.24.3",
2222
"@babel/preset-env": "^7.24.3",
2323
"@babel/preset-react": "^7.24.1",
24+
"@types/node": "^22.7.4",
2425
"@types/react": "^18.3.11",
2526
"@types/react-dom": "^18.3.0",
2627
"@types/wordpress__blocks": "^12.5.14",
27-
"@types/wordpress__components": "^23.8.0",
2828
"@wordpress/scripts": "^27.7.0",
2929
"gulp": "^4.0.2",
3030
"gulp-babel": "^8.0.0",

pnpm-lock.yaml

Lines changed: 0 additions & 17185 deletions
This file was deleted.

resources/assets/apps/app.jsx renamed to resources/assets/apps/app.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
declare const wp: any;
12
const { render } = wp.element;
23

34
import '@mantine/core/styles.css';
@@ -6,6 +7,7 @@ import 'mantine-datatable/styles.css';
67

78
import { MantineProvider } from '@mantine/core';
89
import { Notifications } from '@mantine/notifications';
10+
import * as React from 'react';
911
import { BrowserRouter, Route, Routes } from 'react-router-dom';
1012
import { Demo } from './components/Demo';
1113

resources/assets/apps/components/Demo.jsx renamed to resources/assets/apps/components/Demo.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { showNotification } from '@mantine/notifications';
33
import { DataTable } from 'mantine-datatable';
44
import { useAjax } from './use-ajax';
55

6+
import * as React from 'react';
67
import classes from './Demo.module.scss';
78

89
export const Demo = () => {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.module.scss' {
2+
const classes: { [key: string]: string };
3+
export default classes;
4+
}

tsconfig.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "./public/apps",
4+
"sourceMap": true,
5+
"noImplicitAny": true,
6+
"module": "es6",
7+
"target": "es5",
8+
"jsx": "react",
9+
"allowJs": true,
10+
"typeRoots": [
11+
"./node_modules/@types",
12+
"./declaration.d.ts"
13+
],
14+
"moduleResolution": "node"
15+
},
16+
"include": [
17+
"resources/assets/apps"
18+
]
19+
}

0 commit comments

Comments
 (0)