al-quran.reflectslight.io/etc/webpack.common.js

41 lines
984 B
JavaScript
Raw Normal View History

const path = require("path");
module.exports = {
resolve: {
2024-08-22 20:39:55 +02:00
modules: [path.resolve(__dirname, "..", "node_modules")],
2024-03-16 18:07:53 +01:00
alias: {
2024-08-22 20:39:55 +02:00
"@css": path.resolve(__dirname, "..", "src", "css"),
"@json": path.resolve(__dirname, "..", "src", "json"),
"~": path.resolve(__dirname, "..", "src", "js"),
2024-08-31 05:25:04 +02:00
"react": "preact/compat",
"react-dom/test-utils": "preact/test-utils",
"react-dom": "preact/compat",
"react/jsx-runtime": "preact/jsx-runtime",
2024-03-16 18:07:53 +01:00
},
2024-07-23 02:38:23 +02:00
extensions: [".js", ".ts", ".tsx", ".json", ".css", ".scss"],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'esbuild-loader',
exclude: /node_modules/,
options: {
loader: 'tsx',
target: 'es2015'
}
},
2024-07-23 02:38:23 +02:00
{
test: /\.(scss|css)$/i,
exclude: /node_modules/,
use: [
"style-loader",
"css-loader",
"sass-loader",
]
}
],
},
2024-07-23 02:38:23 +02:00
plugins: []
};