mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
tweak(webpack): Added copy plugin to webpack allowing for easier build
Also changed build script name
This commit is contained in:
1 parent
54daa42454
commit
a29ba86577
3 files changed
+253
-13
No files matched your search
@@ -1,16 +1,17 @@
|
||||
const path = require("path");
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const ResourceManifestPlugin = require("./webpack.fxmanifest.plugin");
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const ResourceManifestPlugin = require('./webpack.fxmanifest.plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = require("./webpack.common")({
|
||||
mode: "production",
|
||||
module.exports = require('./webpack.common')({
|
||||
mode: 'production',
|
||||
|
||||
// In production, we skip all hot-reloading stuff
|
||||
entry: [path.join(process.cwd(), "src/index.tsx")],
|
||||
entry: [path.join(process.cwd(), 'src/index.tsx')],
|
||||
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: "public/index.html",
|
||||
template: 'public/index.html',
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
@@ -26,6 +27,14 @@ module.exports = require("./webpack.common")({
|
||||
inject: true,
|
||||
}),
|
||||
new ResourceManifestPlugin(),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: 'public/media',
|
||||
to: path.resolve(process.cwd(), '../resources/html/media'),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
|
||||
performance: {
|
||||
|
||||
Reference in new issue
Block a user