added two apps, and better implementation

This commit is contained in:
David Meincke
2022-03-22 18:20:26 +01:00
parent bb44e0e92d
commit 33b3f2e5cc
47 changed files with 486 additions and 151 deletions
+9 -9
View File
@@ -3,7 +3,6 @@ const common = require('./webpack.common.js');
const path = require('path');
const ReplaceInFileWebpackPlugin = require('replace-in-file-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const prodFolderName = "prod-dist";
@@ -18,28 +17,29 @@ const replaceVersionInHtmlOption = {
return match.toString().substr(0, 3) +
+new Date();
}
}
}
]
};
module.exports = merge(common, {
mode: "production",
output: {
path: path.resolve(__dirname, prodFolderName),
publicPath: "/",
filename: 'main.js'
globalObject: 'self',
filename: '[name].bundle.js',
path: path.resolve(__dirname, prodFolderName, "codeeditor"),
publicPath: "/"
},
plugins: [
new CopyWebpackPlugin(
{
patterns: [
{
from: path.resolve(__dirname, 'index.html'),
to: path.resolve(__dirname, prodFolderName, '[name][ext]')
from: path.resolve(__dirname, 'codeeditor-app/static'),
to: path.resolve(__dirname, prodFolderName, 'codeeditor', '[name][ext]')
},
{
from: path.resolve(__dirname, 'manifest.json'),
to: path.resolve(__dirname, devFolderName, '[name][ext]')
from: path.resolve(__dirname, 'outputframe-app/static'),
to: path.resolve(__dirname, prodFolderName, 'outputframe', '[name][ext]')
}
]
}