'ERROR in No configuration provided for /resources/css/app.css
I'm a bit new to webpack and TailwindCSS. The stack we are using here is Laravel with Tailwind and predefined template.
I'm trying to start NPM but get the following error:
ERROR in No configuration provided for ....../resources/css/app.css
My webpack.mix.js has
mix.js('resources/js/main.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
require("tailwindcss"),
]);
And webpack.config.js has:
const config = require('./site.config');
const loaders = require('./webpack.loaders');
const plugins = require('./webpack.plugins');
module.exports = {
context: path.join(config.root, config.paths.src),
entry: [
path.join(config.root, config.paths.src, 'js/main.js'),
path.join(config.root, config.paths.src, 'css/style.scss'),
],
output: {
path: path.join(config.root, config.paths.dist),
publicPath: '',
filename: '[name].[hash].js',
},
mode: ['production', 'development'].includes(config.env)
? config.env
: 'development',
devtool: config.env === 'production'
? 'hidden-source-map'
: 'cheap-eval-source-map',
devServer: {
contentBase: path.join(config.root, config.paths.src),
watchContentBase: true,
hot: true,
open: true,
host: config.dev_host,
},
module: {
rules: loaders,
},
stats: 'errors-only',
plugins,
};
There is no where a reference of app.css... What am I doing wrong.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
