Moved "extension/ui" to "webview", removed "shared".
This commit is contained in:
@@ -2,6 +2,7 @@ import * as webpack from "webpack";
|
||||
import path = require("path");
|
||||
import { CleanWebpackPlugin } from "clean-webpack-plugin";
|
||||
import CopyPlugin = require("copy-webpack-plugin");
|
||||
import { readFileSync } from "fs";
|
||||
|
||||
const r = (file: string) => path.resolve(__dirname, file);
|
||||
|
||||
@@ -19,6 +20,7 @@ module.exports = {
|
||||
vscode: "commonjs vscode",
|
||||
"@hediet/debug-visualizer-data-extraction":
|
||||
"@hediet/debug-visualizer-data-extraction",
|
||||
"debug-visualizer-webview": "debug-visualizer-webview",
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"],
|
||||
@@ -41,14 +43,22 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new CopyPlugin([
|
||||
{
|
||||
from: r("../data-extraction/"),
|
||||
to: r(
|
||||
"./dist/node_modules/@hediet/debug-visualizer-data-extraction/"
|
||||
),
|
||||
ignore: ["**/node_modules/**/*"],
|
||||
},
|
||||
]),
|
||||
includeDependency(r("../data-extraction/")),
|
||||
includeDependency(r("../webview/")),
|
||||
],
|
||||
} as webpack.Configuration;
|
||||
|
||||
function includeDependency(location: string) {
|
||||
const content = readFileSync(path.join(location, "package.json"), {
|
||||
encoding: "utf8",
|
||||
});
|
||||
const pkgName = JSON.parse(content).name;
|
||||
|
||||
return new CopyPlugin([
|
||||
{
|
||||
from: location,
|
||||
to: r(`./dist/node_modules/${pkgName}`),
|
||||
ignore: ["**/node_modules/**/*"],
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user