Treecat
2 years ago
3 changed files with 43 additions and 6 deletions
@ -0,0 +1,34 @@ |
|||||||
|
const webpack = require("webpack"); |
||||||
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); |
||||||
|
const TerserPlugin = require("terser-webpack-plugin"); |
||||||
|
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); |
||||||
|
const common = require("./webpack.common.js"); |
||||||
|
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); |
||||||
|
const childProcess = require("child_process"); |
||||||
|
const { merge } = require("webpack-merge"); |
||||||
|
const dirs = require("./dirs"); |
||||||
|
const attachments = require("./attachments"); |
||||||
|
const path = require("path"); |
||||||
|
|
||||||
|
function git(command) { |
||||||
|
return childProcess.execSync(`git ${command}`).toString().trim(); |
||||||
|
} |
||||||
|
|
||||||
|
module.exports = merge(common, { |
||||||
|
mode: "development", |
||||||
|
|
||||||
|
devtool: "inline-source-map", |
||||||
|
|
||||||
|
output: { |
||||||
|
path: dirs.DEST, |
||||||
|
filename: "[name].js", |
||||||
|
}, |
||||||
|
|
||||||
|
devServer: { |
||||||
|
port: 9001, |
||||||
|
liveReload: true, |
||||||
|
historyApiFallback: { |
||||||
|
rewrites: [{ from: /.*/, to: "/index.html" }], |
||||||
|
}, |
||||||
|
}, |
||||||
|
}); |
Loading…
Reference in new issue