mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-10 20:46:52 +00:00
87717981eb
* chore: update noise * update: package.lock * update: @chainsafe/libp2p-gossipsub * rm unwanted libp2p interface deps & bump up libp2p * refactor code for new deps * update: new package.lock * setup prettier, refactor eslint and rm trailing commas * update package.lock * fix build * import type for interface * fix imports for merge * update typedoc exports * add: CustomEvent import * use new libp2p interface * add aegir as dev dep for tests
58 lines
1.3 KiB
JavaScript
58 lines
1.3 KiB
JavaScript
process.env.CHROME_BIN = require("puppeteer").executablePath();
|
|
const webpack = require("webpack");
|
|
|
|
module.exports = function (config) {
|
|
config.set({
|
|
frameworks: ["webpack", "mocha"],
|
|
files: ["src/**/!(node).spec.ts"],
|
|
preprocessors: {
|
|
"src/**/!(node).spec.ts": ["webpack"]
|
|
},
|
|
envPreprocessor: ["CI"],
|
|
reporters: ["progress"],
|
|
browsers: ["ChromeHeadless"],
|
|
singleRun: true,
|
|
client: {
|
|
mocha: {
|
|
timeout: 6000 // Default is 2s
|
|
}
|
|
},
|
|
webpack: {
|
|
mode: "development",
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.([cm]?ts|tsx)$/,
|
|
use: [
|
|
{
|
|
loader: "ts-loader",
|
|
options: {
|
|
configFile: "tsconfig.karma.json"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
"process.env.CI": process.env.CI || false
|
|
}),
|
|
new webpack.ProvidePlugin({
|
|
process: "process/browser.js"
|
|
})
|
|
],
|
|
resolve: {
|
|
extensions: [".ts", ".tsx", ".js"],
|
|
extensionAlias: {
|
|
".js": [".js", ".ts"],
|
|
".cjs": [".cjs", ".cts"],
|
|
".mjs": [".mjs", ".mts"]
|
|
}
|
|
},
|
|
stats: { warnings: false },
|
|
devtool: "inline-source-map"
|
|
}
|
|
});
|
|
};
|