You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
ERROR in ./assets/main/components/components-critical.css (./node_modules/css-loader??ref--4-2!./node_modules/postcss-loader/lib!./assets/main/components/components-critical.css)
Module build failed: Syntax Error
(2:5) `@apply` cannot be used with `.w-full` because `.w-full` either cannot be found, or it's actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that `.w-full` exists, make sure that any `@import` statements are being properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.
1 | .nav {
> 2 | @apply .w-full;
| ^
3 | }
4 |
And I do not know where this problem occures
My webpack.config:
constpath=require('path');constManifestPlugin=require('webpack-manifest-plugin');constMiniCssExtractPlugin=require("mini-css-extract-plugin");module.exports=function(env,argv){return{entry: {'main-base': ['./assets/main/base/index.css',],'main-components-critical': ['./assets/main/components/index-critical.js',],'main-components': ['./assets/main/components/index.js',],'react': ['./assets/main/components/react.js',],'main-utilities': ['./assets/main/utilities/index.css',],},output: {path: path.resolve(__dirname,'web/public/assets'),filename: '[name].[hash].js',chunkFilename: '[name].[hash].js'},module: {rules: [{test: /\.css$/,use: ['style-loader',MiniCssExtractPlugin.loader,{loader: 'css-loader',options: {importLoaders: 1,minimize: argv['mode']==='production'}},'postcss-loader']},{test: /\.(js|jsx)$/,exclude: /node_modules/,use: ['babel-loader']}]},plugins: [newManifestPlugin(),newMiniCssExtractPlugin({// Options similar to the same options in webpackOptions.output// both options are optionalfilename: '[name].[hash].css',chunkFilename: '[name].[hash].css'})]}};
Tailwind preflight is in assets/main/base/index.css (@import 'tailwindcss/preflight';)
Tailwind utilities is in assets/main/utilities/index.css (@import 'tailwindcss/utilities';)
And in assets/main/components/navigation/style-critical.css I have the @apply this stylesheet is imported in assets/main/components/components-critical.css (@import './navigation/style-critical.css';)
I think everything is configured as expected from tailwind
postcss.config.js
I also was not able to make @apply work with webpack and post-css. Tailwind runs (I know it because it inserts the @tailwind directives in the styles), but the applys just don't work, I ended up running tailwind with an npm script, but it's kind of a loose wheel from my webpack configuration.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have this error:
And I do not know where this problem occures
My webpack.config:
Tailwind preflight is in assets/main/base/index.css (
@import 'tailwindcss/preflight';
)Tailwind utilities is in assets/main/utilities/index.css (
@import 'tailwindcss/utilities';
)And in assets/main/components/navigation/style-critical.css I have the
@apply
this stylesheet is imported in assets/main/components/components-critical.css (@import './navigation/style-critical.css';
)I think everything is configured as expected from tailwind
postcss.config.js
and package.json
If you need more information let me know. I do not know what I am doing wrong :(
The text was updated successfully, but these errors were encountered: