Make sure katex styles are shipped under root of

Also copies of just the katex css we need instead of bundling the entire module
This commit is contained in:
Matt Bierner
2021-03-16 17:43:52 -07:00
parent 581a659d42
commit fc8d7681c4
5 changed files with 25 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
@@ -23,5 +24,20 @@ module.exports = {
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'notebook-out')
}
},
plugins: [
// @ts-ignore
new CopyPlugin({
patterns: [
{
from: './node_modules/katex/dist/katex.min.css',
to: 'katex.min.css'
},
{
from: './node_modules/katex/dist/fonts',
to: 'fonts/'
},
],
}),
]
};