forked from deeptailor/openmct-as-a-dependency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.mjs
29 lines (26 loc) · 829 Bytes
/
webpack.dev.mjs
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
import path from 'path';
import { fileURLToPath } from 'url';
import HtmlWebpackPlugin from "html-webpack-plugin";
import { merge } from 'webpack-merge';
import commonConfig from './webpack.common.mjs';
// Replicate __dirname functionality for ES modules
const __dirname = path.dirname(fileURLToPath(import.meta.url));
/** @type {import('webpack').Configuration} */
const devConfig = {
mode: 'development',
devtool: 'eval-source-map',
plugins: [
new HtmlWebpackPlugin({
template: "index.html",
}),
],
devServer: {
static: [
{directory: path.join(__dirname, "dist")},
{directory: path.join(__dirname, "node_modules/openmct/dist")}
],
compress: true,
port: 9000,
}
};
export default merge(commonConfig, devConfig);