-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.bundles.config.cjs
More file actions
46 lines (44 loc) · 1.09 KB
/
Copy pathwebpack.bundles.config.cjs
File metadata and controls
46 lines (44 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* webpack.bundles.config.cjs
*
* Builds only the isolated library bundles needed by the QuickJS sandbox
* (dist/<lib>.bundle.js), without building the main application.
*
* Used as a pre-step for compatibility testing:
* npx webpack --config webpack.bundles.config.cjs
*/
const path = require("path");
require("tsx/cjs");
const {
WebpackSandboxPlugin,
} = require("./webpack-sandbox-plugin/src/plugin.ts");
module.exports = {
// Minimal entry — nothing is actually bundled here.
// The SandboxPlugin's child compiler handles building the library bundles.
entry: "./test-harness/init.js",
output: {
filename: "_bundles-trigger.js",
path: path.resolve(__dirname, "dist"),
},
mode: "development",
resolve: {
alias: {
"bresenham-zingl": path.resolve(__dirname, "node_modules/bresenham-zingl/dist/index.mjs"),
},
},
module: {
rules: [
{
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
},
],
},
plugins: [
new WebpackSandboxPlugin({
configPath: "./.sandbox/sandbox.config.js",
}),
],
};