feat(fe/api): expose quickshare api in the frontend dev mode

This commit is contained in:
hexxa 2022-03-28 15:58:57 +08:00 committed by Hexxa
parent 9172336d35
commit e4940fca34
3 changed files with 65 additions and 6 deletions

View file

@ -4,19 +4,20 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
const dev = require("./webpack.dev.js");
module.exports = merge(dev, {
entry: "./src/app.tsx",
entry: ["./src/app.tsx", "./src/components/api.ts"],
context: `${__dirname}`,
output: {
globalObject: "this",
path: `${__dirname}/../../../public/static`,
chunkFilename: "[name].bundle.js",
filename: "[name].bundle.js"
filename: "[name].bundle.js",
library: "Q",
},
plugins: [
new HtmlWebpackPlugin({
template: `${__dirname}/build/template/index.template.dev.html`,
hash: true,
filename: `../index.html`
})
]
filename: `../index.html`,
}),
],
});