mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
first commit
This commit is contained in:
commit
91b1341271
165 changed files with 20993 additions and 0 deletions
31
webpack.rules.ts
Normal file
31
webpack.rules.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import type { ModuleOptions } from "webpack";
|
||||
|
||||
export const rules: Required<ModuleOptions>["rules"] = [
|
||||
// Add support for native node modules
|
||||
{
|
||||
// We're specifying native_modules in the test because the asset relocator loader generates a
|
||||
// "fake" .node file which is really a cjs file.
|
||||
test: /native_modules[/\\].+\.node$/,
|
||||
use: "node-loader",
|
||||
},
|
||||
{
|
||||
test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
|
||||
parser: { amd: false },
|
||||
use: {
|
||||
loader: "@vercel/webpack-asset-relocator-loader",
|
||||
options: {
|
||||
outputAssetBase: "native_modules",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
exclude: /(node_modules|\.webpack)/,
|
||||
use: {
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
transpileOnly: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue