mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 12:45:39 +01:00
Small tweaks
This commit is contained in:
parent
45227a089e
commit
e65bc32232
3 changed files with 6 additions and 64 deletions
|
|
@ -1,60 +0,0 @@
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
mode: 'production',
|
|
||||||
entry: {
|
|
||||||
core: './ci/core.js',
|
|
||||||
'editor.worker': './vscode/out-monaco-editor-core/esm/vs/editor/editor.worker.js',
|
|
||||||
'json.worker': 'monaco-json/release/esm/json.worker',
|
|
||||||
'css.worker': 'monaco-css/release/esm/css.worker',
|
|
||||||
'html.worker': 'monaco-html/release/esm/html.worker',
|
|
||||||
'ts.worker': 'monaco-typescript/release/esm/ts.worker'
|
|
||||||
},
|
|
||||||
output: {
|
|
||||||
globalObject: 'self',
|
|
||||||
filename: '[name].bundle.js',
|
|
||||||
path: path.resolve(__dirname, '../dist')
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
test: /\.css$/,
|
|
||||||
use: ['style-loader', 'css-loader']
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
|
|
||||||
use: [
|
|
||||||
{
|
|
||||||
loader: 'file-loader',
|
|
||||||
options: {
|
|
||||||
name: '[name].[ext]',
|
|
||||||
outputPath: 'fonts/'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'monaco-editor-core/esm/vs/editor/editor.worker': path.resolve(
|
|
||||||
__dirname,
|
|
||||||
'../vscode/out-monaco-editor-core/esm/vs/editor/editor.worker.js'
|
|
||||||
),
|
|
||||||
'monaco-editor-core': path.resolve(
|
|
||||||
__dirname,
|
|
||||||
'../vscode/out-monaco-editor-core/esm/vs/editor/editor.main.js'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
stats: {
|
|
||||||
all: false,
|
|
||||||
modules: true,
|
|
||||||
errors: true,
|
|
||||||
warnings: true,
|
|
||||||
// our additional options
|
|
||||||
moduleTrace: true,
|
|
||||||
errorDetails: true,
|
|
||||||
chunks: true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"typings": "./out/index.d.ts",
|
"typings": "./out/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"smoketest": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack.config.js --progress",
|
"smoketest": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack.config.js --progress",
|
||||||
"test-cross-origin": "node ./node_modules/webpack/bin/webpack.js --config test/webpack-cross-origin.config.js --progress",
|
"smoketest-cross-origin": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack-cross-origin.config.js --progress",
|
||||||
"watch": "tsc -w -p tsconfig.json",
|
"watch": "tsc -w -p tsconfig.json",
|
||||||
"compile": "tsc -p tsconfig.json",
|
"compile": "tsc -p tsconfig.json",
|
||||||
"import-editor": "node ./scripts/import-editor.js",
|
"import-editor": "node ./scripts/import-editor.js",
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,20 @@ const path = require('path');
|
||||||
|
|
||||||
const ASSET_PATH = 'http://localhost:8088/monaco-editor-webpack-plugin/test/dist/';
|
const ASSET_PATH = 'http://localhost:8088/monaco-editor-webpack-plugin/test/dist/';
|
||||||
|
|
||||||
|
const REPO_ROOT = path.join(__dirname, '../../');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
entry: './index.js',
|
entry: './index.js',
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'dist'),
|
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
|
||||||
filename: 'app.js',
|
filename: 'app.js',
|
||||||
publicPath: ASSET_PATH
|
publicPath: ASSET_PATH
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'monaco-editor': path.resolve(__dirname, '../../release')
|
'monaco-editor': path.resolve(REPO_ROOT, 'release')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
|
|
@ -31,7 +33,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new MonacoWebpackPlugin({
|
new MonacoWebpackPlugin({
|
||||||
monacoEditorPath: path.resolve(__dirname, '../../release')
|
monacoEditorPath: path.resolve(REPO_ROOT, 'release')
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue