mirror of
https://github.com/dagucloud/dagu.git
synced 2026-12-05 05:32:51 +00:00
41 lines
798 B
JavaScript
41 lines
798 B
JavaScript
const webpack = require("webpack");
|
|
const path = require("path");
|
|
|
|
module.exports = {
|
|
entry: "./src/index.tsx",
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
{
|
|
test: /\.(png|jpg|gif)$/i,
|
|
use: [
|
|
{
|
|
loader: "url-loader",
|
|
options: {
|
|
encoding: "base64",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new webpack.ContextReplacementPlugin(
|
|
/monaco-editor(\\|\/)esm(\\|\/)vs(\\|\/)editor(\\|\/)common(\\|\/)services/,
|
|
__dirname
|
|
),
|
|
],
|
|
resolve: {
|
|
extensions: [".tsx", ".ts", ".js"],
|
|
},
|
|
output: {
|
|
filename: "bundle.js",
|
|
path: path.resolve(__dirname, "dist"),
|
|
publicPath: "/",
|
|
clean: true,
|
|
},
|
|
};
|