mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* core webpack dependencies as externals Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * use fork-ts-checker-webpack-plugin Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> --------- Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
38 lines
895 B
TypeScript
38 lines
895 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
import type webpack from "webpack";
|
|
import path from "path";
|
|
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
|
import webpackLensMain from "./main";
|
|
import { buildDir } from "./vars";
|
|
|
|
const webpackLensCommon = (): webpack.Configuration => {
|
|
const mainConfig = webpackLensMain();
|
|
|
|
return {
|
|
...mainConfig,
|
|
name: "lens-app-common",
|
|
entry: {
|
|
common: path.resolve(__dirname, "..", "src", "common", "library.ts"),
|
|
},
|
|
output: {
|
|
publicPath: "",
|
|
library: {
|
|
type: "commonjs2",
|
|
},
|
|
path: path.resolve(buildDir, "library"),
|
|
},
|
|
optimization: {
|
|
minimize: false,
|
|
},
|
|
plugins: [
|
|
new ForkTsCheckerPlugin({}),
|
|
],
|
|
};
|
|
};
|
|
|
|
export default webpackLensCommon;
|