mirror of
https://github.com/LukeHagar/firecamp.git
synced 2025-12-07 20:37:45 +00:00
feat: webpack build improvement 2x and unused scripts files are removed and refactored
This commit is contained in:
@@ -8,10 +8,10 @@ const path = require('path');
|
||||
// const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const metadata = require('./package.json');
|
||||
|
||||
const env = process.env.NODE_ENV;
|
||||
|
||||
const NodeEnv = process.env.NODE_ENV;
|
||||
console.log(process.env.FIRECAMP_API_HOST, 'FIRECAMP_API_HOST'); // for debugging purposes. remove when ready.
|
||||
|
||||
const plugins = [
|
||||
@@ -84,6 +84,14 @@ const plugins = [
|
||||
),
|
||||
},
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: `${__dirname}/platform/firecamp-platform/public/assets`,
|
||||
to: `${__dirname}/build/${NodeEnv}`,
|
||||
},
|
||||
],
|
||||
}),
|
||||
];
|
||||
|
||||
const rules = [
|
||||
@@ -177,6 +185,7 @@ module.exports = {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
name(module) {
|
||||
return 'vender';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user