1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/webpack.dll.ts
Roman b7974827d2
Lens restructure (#540)
Signed-off-by: Roman <ixrock@gmail.com>
2020-06-30 14:35:16 +03:00

35 lines
798 B
TypeScript
Executable File

import path from "path";
import webpack, { LibraryTarget } from "webpack";
import { isDevelopment, outDir } from "./src/common/vars";
export const library = "dll"
export const libraryTarget: LibraryTarget = "commonjs2"
export const manifestPath = path.resolve(outDir, `${library}.manifest.json`);
export const packages = [
"react", "react-dom",
"ace-builds", "xterm",
"moment",
];
export default function (): webpack.Configuration {
return {
context: path.dirname(manifestPath),
mode: isDevelopment ? "development" : "production",
cache: isDevelopment,
entry: {
[library]: packages,
},
output: {
library,
libraryTarget,
},
plugins: [
new webpack.DllPlugin({
name: library,
path: manifestPath,
})
],
}
}