2019-12-19 19:26:26 +08:00
|
|
|
const MonacoWebpackPlugin = require('../out/index.js');
|
|
|
|
const path = require('path');
|
|
|
|
|
2021-11-16 06:12:17 +08:00
|
|
|
const ASSET_PATH = 'http://localhost:8088/monaco-editor/test/smoke/webpack/out/';
|
2019-12-19 19:26:26 +08:00
|
|
|
|
2021-11-16 05:37:47 +08:00
|
|
|
const REPO_ROOT = path.join(__dirname, '../../');
|
|
|
|
|
2019-12-19 19:26:26 +08:00
|
|
|
module.exports = {
|
2021-11-06 07:15:13 +08:00
|
|
|
mode: 'development',
|
|
|
|
entry: './index.js',
|
|
|
|
context: __dirname,
|
|
|
|
output: {
|
2021-11-16 05:37:47 +08:00
|
|
|
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
|
2021-11-06 07:15:13 +08:00
|
|
|
filename: 'app.js',
|
|
|
|
publicPath: ASSET_PATH
|
|
|
|
},
|
2021-11-12 02:27:59 +08:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
2021-11-16 05:37:47 +08:00
|
|
|
'monaco-editor': path.resolve(REPO_ROOT, 'release')
|
2021-11-12 17:55:50 +08:00
|
|
|
}
|
2021-11-12 02:27:59 +08:00
|
|
|
},
|
2021-11-06 07:15:13 +08:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: ['style-loader', 'css-loader']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.ttf$/,
|
|
|
|
use: ['file-loader']
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2021-11-12 17:55:50 +08:00
|
|
|
plugins: [
|
|
|
|
new MonacoWebpackPlugin({
|
2021-11-16 05:37:47 +08:00
|
|
|
monacoEditorPath: path.resolve(REPO_ROOT, 'release')
|
2021-11-12 17:55:50 +08:00
|
|
|
})
|
|
|
|
]
|
2019-12-19 19:26:26 +08:00
|
|
|
};
|