added two apps, and better implementation
This commit is contained in:
+9
-9
@@ -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]')
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user