Files
vscode/extensions/notebook-markdown-extensions/webpack.notebook.js
Matt Bierner 9b2ee7fb7d Reduce size of Katex bundle
Only load woff2 fonts instead of including all fallback font types in the bundle
2021-03-10 19:56:46 -08:00

41 lines
954 B
JavaScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const path = require('path');
module.exports = {
entry: {
katex: './notebook/katex.ts',
emoji: './notebook/emoji.ts',
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(woff2)$/i,
use: ['url-loader?limit=100000']
},
{
test: /\.(woff|eot|ttf|otf)$/i,
use: ['null-loader']
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'notebook-out')
}
};