mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Fix "Multiple assets emit to the same filename 0.app.js" error
This commit is contained in:
parent
c19aff59af
commit
5d5e00dbb2
1 changed files with 3 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
class AddWorkerEntryPointPlugin {
|
class AddWorkerEntryPointPlugin {
|
||||||
constructor(webpack, { id, entry, output }) {
|
constructor(webpack, { id, entry, output }) {
|
||||||
this.webpack = webpack;
|
this.webpack = webpack;
|
||||||
|
|
@ -11,6 +13,7 @@ class AddWorkerEntryPointPlugin {
|
||||||
const outputOptions = {
|
const outputOptions = {
|
||||||
filename: output,
|
filename: output,
|
||||||
publicPath: compilation.outputOptions.publicPath,
|
publicPath: compilation.outputOptions.publicPath,
|
||||||
|
chunkFilename: `${path.basename(output)}.[id].js`,
|
||||||
// HACK: globalObject is necessary to fix https://github.com/webpack/webpack/issues/6642
|
// HACK: globalObject is necessary to fix https://github.com/webpack/webpack/issues/6642
|
||||||
globalObject: 'this',
|
globalObject: 'this',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue