Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Q] Webpack Usage? #78

Open
heychazza opened this issue Sep 8, 2021 · 6 comments
Open

[Q] Webpack Usage? #78

heychazza opened this issue Sep 8, 2021 · 6 comments

Comments

@heychazza
Copy link

Hey buddy,

Is there any chance you can provide a usage example with Webpack?

@JPeer264
Copy link
Owner

JPeer264 commented Sep 8, 2021

Hey. Actually there are couple of plugins documented in the core library: https://github.com/JPeer264/node-rcs-core#plugins

Might be useful to also add them in this repo. If you haven't seen it already, there is a webpack plugin for rcs: https://www.npmjs.com/package/rcs-webpack-plugin

@heychazza
Copy link
Author

The usage for https://www.npmjs.com/package/rcs-webpack-plugin, where does this go? The docs don't specify aha

@heychazza
Copy link
Author

In addition,

const { rcs } = require('rcs-core')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const RcsWebpackPlugin = require('rcs-webpack-plugin')

mix.webpackConfig({
    module: {
        rules: [
            {
                test: /\.css$/,
                use: [
                    { loader: MiniCssExtractPlugin.loader },
                    'css-loader',
                ],
            },
        ],
    },
    plugins: [
        new MiniCssExtractPlugin(),
        new RcsWebpackPlugin(),
    ],
})

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
Error: Didn't get a result from child compiler

@JPeer264
Copy link
Owner

JPeer264 commented Sep 8, 2021

This actually seems like a mini-css-extract-plugin issue. I've never used Laravel Mix (if that is that one), but maybe you have some scss files in it where you also need a sass-loader and use test: /\.s?css$/, as file tester?

@heychazza
Copy link
Author

heychazza commented Sep 8, 2021

This actually seems like a mini-css-extract-plugin issue. I've never used Laravel Mix (if that is that one), but maybe you have some scss files in it where you also need a sass-loader and use test: /\.s?css$/, as file tester?

Theres no sass sadly, just tailwind .css file

@JPeer264
Copy link
Owner

JPeer264 commented Sep 8, 2021

May I ask how you import the .css file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants