-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Leverage project references - Replace hacks in the demo example - Publish source maps - Publish declaration maps
- Loading branch information
1 parent
0843618
commit 87f7a92
Showing
11 changed files
with
49 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
*.js | ||
*.d.ts | ||
*.tgz | ||
*.tsbuildinfo | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"references": [{ "path": "../../src/tsconfig.json" }], | ||
"compilerOptions": { | ||
"composite": true, | ||
"module": "preserve", | ||
"noEmit": true, | ||
"strict": true, | ||
"target": "esnext" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,39 @@ | ||
import { fileURLToPath } from 'url' | ||
|
||
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin' | ||
import HtmlWebPackPlugin from 'html-webpack-plugin' | ||
import MiniCssExtractPlugin from 'mini-css-extract-plugin' | ||
|
||
const monacoUnified = new URL('../../', import.meta.url) | ||
const nodeModules = new URL('node_modules/', monacoUnified) | ||
|
||
/** @type {import('webpack').Configuration} */ | ||
export default { | ||
output: { | ||
filename: '[contenthash].js', | ||
filename: '[contenthash].js' | ||
}, | ||
resolve: { | ||
extensions: ['.mjs', '.js', '.ts'], | ||
extensionAlias: { | ||
'.js': ['.js', '.ts'], | ||
}, | ||
alias: { | ||
'monaco-unified': fileURLToPath(monacoUnified), | ||
'decode-named-character-reference': fileURLToPath( | ||
new URL('decode-named-character-reference/index.js', nodeModules), | ||
), | ||
'.js': ['.js', '.ts'] | ||
}, | ||
conditionNames: ['worker'] | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: [MiniCssExtractPlugin.loader, 'css-loader'], | ||
use: [MiniCssExtractPlugin.loader, 'css-loader'] | ||
}, | ||
{ | ||
// Monaco editor uses .ttf icons. | ||
test: /\.(svg|ttf)$/, | ||
type: 'asset/resource', | ||
type: 'asset/resource' | ||
}, | ||
{ | ||
test: /\.ts$/, | ||
loader: 'ts-loader', | ||
options: { transpileOnly: true }, | ||
}, | ||
], | ||
options: { transpileOnly: true } | ||
} | ||
] | ||
}, | ||
optimization: { | ||
minimizer: ['...', new CssMinimizerPlugin()], | ||
minimizer: ['...', new CssMinimizerPlugin()] | ||
}, | ||
plugins: [new HtmlWebPackPlugin(), new MiniCssExtractPlugin({ filename: '[contenthash].css' })], | ||
plugins: [new HtmlWebPackPlugin(), new MiniCssExtractPlugin({ filename: '[contenthash].css' })] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"sourceMap": true, | ||
"module": "nodenext", | ||
"noImplicitAny": true, | ||
"outDir": "../dist", | ||
"strict": true, | ||
"stripInternal": true, | ||
"types": [] | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"module": "node16", | ||
"noEmit": true, | ||
"noImplicitAny": true, | ||
"paths": { | ||
"monaco-unified": ["./index.ts"], | ||
"monaco-unified/worker": ["./worker.ts"] | ||
}, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"stripInternal": true, | ||
"target": "es2019", | ||
"types": [] | ||
} | ||
"files": [], | ||
"references": [{ "path": "./src/tsconfig.json" }, {"path": "./examples/demo/tsconfig.json"}] | ||
} |