Skip to content

Commit

Permalink
Prevent Webpack from watching after build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Mar 7, 2024
1 parent ed49072 commit aa52797
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
const path = require('path');
const webpack = require('webpack');
const BundleTracker = require('webpack-bundle-tracker');
const path = require("path");
const webpack = require("webpack");
const BundleTracker = require("webpack-bundle-tracker");

module.exports = {
context: __dirname,
mode: 'production',
entry: './apps/static/js/index',
watch: true,
mode: "production",
entry: "./apps/static/js/index",
watch: false,
output: {
path: path.resolve('./apps/static/js/'),
filename: "[name].js"
path: path.resolve("./apps/static/js/"),
filename: "[name].js",
},
devtool: 'source-map',
plugins: [
new BundleTracker({filename: './webpack-stats.json'})
],
devtool: "source-map",
plugins: [new BundleTracker({ filename: "./webpack-stats.json" })],
module: {
rules: [
{
test: /\.js$/,
enforce: 'pre',
use: ['source-map-loader'],
},
enforce: "pre",
use: ["source-map-loader"],
},
{
test: /\.css$/i,
use: ["css-loader"],
},
],
}
}
},
};

0 comments on commit aa52797

Please sign in to comment.