Skip to content

Monaco css assets tripping up webpack #1484

Closed Answered by timkpaine
timkpaine asked this question in Q&A
Discussion options

You must be logged in to vote

This seems to be working:


const styleLoaders = [
  {loader: "css-loader"},
  {
    loader: "postcss-loader",
    options: {
      postcssOptions: {
        minimize: true,
        plugins: [
          cssnano({
            preset: "lite",
          }),
        ],
      },
    },
  },
];

const rules = [
  {
    test: /\.less$/,
    // exclude: /node_modules\/(?!regular-table)/,
    use: styleLoaders.concat([{loader: "less-loader"}]),
  },
  {
    test: /\.css$/,
    exclude: /node_modules\/monaco-editor/,
    use: styleLoaders,
  },

Replies: 1 comment 1 reply

Comment options

timkpaine
Jul 18, 2021
Maintainer Author

You must be logged in to vote
1 reply
@timkpaine
Comment options

timkpaine Aug 24, 2021
Maintainer Author

Answer selected by timkpaine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant