Add webpack as part of the smoketest

This commit is contained in:
Alex Dima 2021-11-15 22:16:09 +01:00
parent 423a55b305
commit dfe35b15bb
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
14 changed files with 57 additions and 41 deletions

View file

@ -0,0 +1,36 @@
const MonacoWebpackPlugin = require('../out/index.js');
const path = require('path');
const REPO_ROOT = path.join(__dirname, '../../');
module.exports = {
mode: 'development',
entry: './index.js',
context: __dirname,
output: {
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
filename: 'app.js'
},
resolve: {
alias: {
'monaco-editor': path.resolve(REPO_ROOT, 'release')
}
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.ttf$/,
use: ['file-loader']
}
]
},
plugins: [
new MonacoWebpackPlugin({
monacoEditorPath: path.resolve(REPO_ROOT, 'release')
})
]
};