webpack 模块警告(来自./node_modules/laravel-混合/node_modules/postcss-加载器/dist/cjs. js):

xu3bshqb  于 2022-11-13  发布在  Webpack
关注(0)|答案(2)|浏览(241)

我正在尝试安装laravel breeze包的默认身份验证。Laravel混合错误后,npm运行开发。我在Laravel 9
在./resources/css/app.css(./节点模块/css加载程序/分发/cjs.js??规则集[1].规则[5].使用[1]!./节点模块/laravel混合/节点模块/postcss加载程序/分发/cjs.js??规则集[1].规则[5].使用[2]!./resources/css/app.css)中出现警告。

编写器.json

{
     "name": "laravel/laravel",
        "type": "project",
        "description": "The Laravel Framework.",
        "keywords": ["framework", "laravel"],
        "license": "MIT",
        "require": {
            "php": "^8.0.2",
            "guzzlehttp/guzzle": "^7.2",
            "laravel/framework": "^9.2",
            "laravel/sanctum": "^2.14.1",
            "laravel/tinker": "^2.7"
        },
        "require-dev": {
            "fakerphp/faker": "^1.9.1",
            "laravel/breeze": "^1.9",
            "laravel/sail": "^1.0.1",
            "mockery/mockery": "^1.4.4",
            "nunomaduro/collision": "^6.1",
            "phpunit/phpunit": "^9.5.10",
            "spatie/laravel-ignition": "^1.0"
        },
        "autoload": {
            "psr-4": {
                "App\\": "app/",
                "Database\\Factories\\": "database/factories/",
                "Database\\Seeders\\": "database/seeders/"
            }
        },
        "autoload-dev": {
            "psr-4": {
                "Tests\\": "tests/"
            }
        },
        "scripts": {
            "post-autoload-dump": [
                "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
                "@php artisan package:discover --ansi"
            ],
            "post-update-cmd": [
                "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
            ],
            "post-root-package-install": [
                "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
            ],
            "post-create-project-cmd": [
                "@php artisan key:generate --ansi"
            ]
        },
        "extra": {
            "laravel": {
                "dont-discover": []
            }
        },
        "config": {
            "optimize-autoloader": true,
            "preferred-install": "dist",
            "sort-packages": true
        },
        "minimum-stability": "dev",
        "prefer-stable": true
    }

软件包.json

{
        "private": true,
        "scripts": {
            "dev": "npm run development",
            "development": "mix",
            "watch": "mix watch",
            "watch-poll": "mix watch -- --watch-options-poll=1000",
            "hot": "mix watch --hot",
            "prod": "npm run production",
            "production": "mix --production"
        },
        "devDependencies": {
            "@tailwindcss/forms": "^0.4.0",
            "alpinejs": "^3.4.2",
            "autoprefixer": "^9.8.8",
            "axios": "^0.25",
            "css-loader": "^5.2.7",
            "laravel-mix": "^6.0.6",
            "laravel-mix-postcss-config": "^1.4.0",
            "lodash": "^4.17.19",
            "postcss": "^8.3.1",
            "postcss-import": "^14.0.2",
            "postcss-loader": "^3.0.0",
            "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17"
        }
    }

网页包.mix.js

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js').postCss('resources/css/app.css', 'public/css', [
    require('postcss-import'),
    require('tailwindcss'),
    require('autoprefixer'),
]);
kyxcudwk

kyxcudwk1#

使用以下代码更新您的package.json并运行npm run dev

软件包.json

{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "mix",
        "watch": "mix watch",
        "watch-poll": "mix watch -- --watch-options-poll=1000",
        "hot": "mix watch --hot",
        "prod": "npm run production",
        "production": "mix --production"
    },
    "devDependencies": {
        "@tailwindcss/forms": "^0.5.0",
        "alpinejs": "^3.10.2",
        "autoprefixer": "^10.4.7",
        "axios": "^0.27",
        "css-loader": "^6.7.1",
        "laravel-mix": "^6.0.43",
        "laravel-mix-postcss-config": "1.0.4",
        "lodash": "^4.17.21",
        "postcss": "^8.4.13",
        "postcss-import": "^14.1.0",
        "postcss-loader": "^6.2.1",
        "tailwindcss": "^3.0.24"
    }
}
knsnq2tg

knsnq2tg2#

“顺风css刚评论完:{}”的文件中。问题已解决。

相关问题