monaco-editor/webpack-plugin/smoketest/webpack-cross-origin.config.js

40 lines
775 B
JavaScript
Raw Normal View History

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/';
2021-11-16 05:37:47 +08:00
const REPO_ROOT = path.join(__dirname, '../../');
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
},
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-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
})
]
};