Build simple-browser media during watch

Fixes #119795

This lets us avoid having these files checked in
This commit is contained in:
Matt Bierner
2021-03-24 12:27:21 -07:00
parent 68e582380d
commit f8c1ffbb0c
9 changed files with 25 additions and 470 deletions

View File

@@ -3,12 +3,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
context: path.resolve(__dirname),
entry: {
index: './preview-src/index.ts',
},
devtool: 'source-map',
mode: 'production',
module: {
rules: [
{
@@ -24,5 +26,20 @@ module.exports = {
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'media')
}
},
plugins: [
// @ts-ignore
new CopyPlugin({
patterns: [
{
from: './node_modules/vscode-codicons/dist/codicon.css',
to: 'codicon.css'
},
{
from: './node_modules/vscode-codicons/dist/codicon.ttf',
to: 'codicon.ttf'
},
],
}),
]
};