1
0
mirror of https://github.com/lensapp/lens.git synced 2024-11-10 10:36:25 +03:00
lens/webpack.dll.ts
Sebastian Malton 295333d055
add progress bar for webpack compilation (#794)
Signed-off-by: Sebastian Malton <smalton@mirantis.com>

Co-authored-by: Sebastian Malton <smalton@mirantis.com>
2020-09-08 08:44:34 -04:00

37 lines
894 B
TypeScript
Executable File

import path from "path";
import webpack, { LibraryTarget } from "webpack";
import { isDevelopment, buildDir } from "./src/common/vars";
import ProgressBarPlugin from "progress-bar-webpack-plugin";
export const library = "dll"
export const libraryTarget: LibraryTarget = "commonjs2"
export const manifestPath = path.resolve(buildDir, `${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 ProgressBarPlugin(),
new webpack.DllPlugin({
name: library,
path: manifestPath,
})
],
}
}