Replies: 4 comments 2 replies
-
I think the reason might also be related to: vercel/next.js#10975 Solution: As an example:
|
Beta Was this translation helpful? Give feedback.
-
The above example doesn't work when adapted to the latest next@13 const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['monaco-editor'],
webpack(config, options) {
config.plugins.push(new MonacoWebpackPlugin({
languages: ['json'],
filename: 'static/[name].worker.js',
}));
return config;
},
};
module.exports = nextConfig; I get this error in the console/error boundary and next fails
worth noting - despite using the above config with |
Beta Was this translation helpful? Give feedback.
-
@acao have you already solved this problem ? |
Beta Was this translation helpful? Give feedback.
-
There's a next.js working example here: |
Beta Was this translation helpful? Give feedback.
-
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
No response
Actual Behavior
Package is currently broken when used with NextJS, there seems to be no way to fix without modifying the package's source code.
Expected Behavior
Expected to be able to use the package with NextJS, specially since there's a ReactJS sample in the samples folder
Additional Context
It seems that NextJS requires that css files be imported as ".module.css"
Beta Was this translation helpful? Give feedback.
All reactions