Skip to content

Commit

Permalink
fix:config
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi1520 committed Apr 24, 2022
1 parent c3ab141 commit 858d714
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
const path = require("path");

module.exports = {
webpack: (config) => {
eslint: {
ignoreDuringBuilds: true,
},
webpack: (config, { isServer, webpack, dev }) => {
config.module.rules
.filter((rule) => rule.oneOf)
.forEach((rule) => {
Expand All @@ -24,21 +27,24 @@ module.exports = {
});
});

config.plugins.push(
new MonacoWebpackPlugin({
languages: [
"json",
"markdown",
"css",
"typescript",
"javascript",
"html",
"scss",
"less",
],
filename: "static/[name].worker.js",
})
);
config.output.globalObject = "self";
if (!isServer) {
config.plugins.push(
new MonacoWebpackPlugin({
languages: [
"json",
"markdown",
"css",
"typescript",
"javascript",
"html",
"scss",
"less",
],
filename: "static/[name].worker.js",
})
);
}
return config;
},
};

1 comment on commit 858d714

@vercel
Copy link

@vercel vercel bot commented on 858d714 Apr 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-code-pen – ./

next-code-pen-git-main-maqi1520.vercel.app
next-code-pen.vercel.app
next-code-pen-maqi1520.vercel.app

Please sign in to comment.