Unverified Commit cb1d7441 authored by TodorTotev's avatar TodorTotev Committed by GitHub

with-monaco-editor-example-fix (#13186)

* Modified nextjs config so that it works with all types of fonts and images.

* Update next.config.js

* Fix code
Co-authored-by: 's avatarTim Neutkens <timneutkens@me.com>
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent c67908c9
const withCSS = require('@zeit/next-css') const withCSS = require('@zeit/next-css')
const withFonts = require('next-fonts')
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin') const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
module.exports = withCSS( module.exports = withCSS({
withFonts({
webpack: (config) => { webpack: (config) => {
config.module.rules.push({
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
},
},
})
config.plugins.push( config.plugins.push(
new MonacoWebpackPlugin({ new MonacoWebpackPlugin({
// Add languages as needed... // Add languages as needed...
...@@ -15,5 +23,4 @@ module.exports = withCSS( ...@@ -15,5 +23,4 @@ module.exports = withCSS(
return config return config
}, },
}) })
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment