Update etc/

This commit is contained in:
0x1eef 2024-09-03 01:29:42 -03:00
parent 26cd2802f4
commit 690925421a
2 changed files with 14 additions and 5 deletions

View file

@ -1,4 +1,10 @@
{
"include": [
"../src/js/typings/globals.d.ts",
"../src/**/*.ts",
"../src/**/*.tsx",
],
"exclude": ["../node_modules"],
"compilerOptions": {
"strict": true,
"module": "commonjs",
@ -7,7 +13,7 @@
"esModuleInterop": true,
"jsx": "react-jsx",
"lib": [ "ES2020", "DOM" ],
"baseUrl": "src/",
"baseUrl": "../src/",
"paths": { "~/*": ["js/*"] },
"types": ["node", "jest", "@testing-library/jest-dom", "@types/chrome"]
}

View file

@ -1,5 +1,6 @@
const path = require("path");
const process = require("process");
const webpack = require("webpack");
const CopyPlugin = require("copy-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
@ -9,17 +10,16 @@ module.exports = {
},
output: {
filename: "js/[name].js",
path: path.resolve(__dirname, "build")
path: path.resolve(__dirname, "..", "build")
},
resolve: {
alias: {
"~": [path.resolve("src/js/")],
"~": [path.resolve(__dirname, "..", "src", "js")],
"react": "preact/compat",
"react-dom": "preact/compat",
"react/jsx-runtime": "preact/jsx-runtime",
},
roots: [path.resolve("src/js"), path.resolve("node_modules")],
modules: [path.resolve("src/js"), path.resolve("node_modules")],
modules: [path.resolve(__dirname, "..", "node_modules")],
extensions: [".ts", ".tsx"]
},
module: {
@ -47,5 +47,8 @@ module.exports = {
],
}),
new CleanWebpackPlugin(),
new webpack.ProvidePlugin({
React: ['preact/compat']
}),
],
}