Git Product home page Git Product logo

Comments (4)

bvanjoi avatar bvanjoi commented on May 29, 2024

it should align:

const MiniCssExtractPlugin = require("mini-css-extract-plugin");

// webpack.config.js
module.exports = {
  entry: path.resolve(__dirname, "./index.js"),
  module: {
    rules: [{
      test: /\.css$/,
      use: [
       MiniCssExtractPlugin.loader,
       "css-loader",
      {
        loader: "postcss-loader",
        options: {
          postcssOptions: {
            plugins: [{
                postcssPlugin: 'tailwind-auto-import',
                prepare() {
                  return {
                    Once: (root, {
                      AtRule
                    }) => {
                      const tailwindBase = new AtRule({
                        name: 'tailwind',
                        params: 'base',
                      });
                      root.prepend(tailwindBase);
                    }
                  }
                }
              },
              require('tailwindcss')
            ]
          }
        }
      }]
    }],
  },
  plugins: [new MiniCssExtractPlugin()]
}

then npx webpack build

from rspack.

bvanjoi avatar bvanjoi commented on May 29, 2024

reduced:

// index.js
// nothing

// loader.js
class Node {
  toJSON() {
    throw Error('unreachable in webpack but it really did in rspack')
  }
}

function loader(content, sourceMap) {
  const nodes = [new Node()];
  const callback = this.async();
  callback(null, content, sourceMap, {
    nodes
  })
}

module.exports = loader

// rspack.config.js
module.exports = {
  entry: "./index.js",
  module: {
    rules: [
      {
        test: /index\.js/,
        use: [
          {
            loader: "./loader.js",
          }
        ]
      }
    ]
  },
}

from rspack.

bvanjoi avatar bvanjoi commented on May 29, 2024

This issue arises from the communication between Rust and JavaScript. We need to retrieve the buffer in JavaScript and pass it to Rust. This situation might introduce some incompatibility into the webpack ecosystem.

from rspack.

h-a-n-a avatar h-a-n-a commented on May 29, 2024

Conclusion: pass ptr to rust and eval lazily

from rspack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.