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
I want to use angular with tailwind css and their @apply custom rule. This rule dont work as expected after installing tailwind for angular. Tailwind requires to add it by custom webpack config with minifying all component styles with tailwind inside one bundle. With my current config this @apply works properly now, but ahead of time compiler says hurtful things....
Expected Behavior
Succeed compiling production build by AOT compiler
Actual Behavior
ERROR in Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: Cannot read property 'replace' of undefined
when i try to ng build --aot
Code
// webpack.config.jsmodule.exports={
...
plugins: [newMiniCssExtractPlugin({fileame: "[name].bundle.css"}),],module: {rules: [{// Extract any SCSS content and minimizetest: /\.scss$/,use: [MiniCssExtractPlugin.loader,{loader: 'css-loader',options: {importLoaders: 1}},{loader: 'postcss-loader',options: {ident : 'postcss',syntax: 'postcss-scss',plugins: ()=>[require('postcss-import'),require('tailwindcss'),autoprefixer]}},{loader: 'sass-loader',options: {plugins: ()=>[autoprefixer()]}}]},{// Extract any CSS content and minimizetest: /\.css$/,use: [MiniCssExtractPlugin.loader,{loader: 'css-loader',options: {importLoaders: 1}},{loader: 'postcss-loader'}]}]}}
The text was updated successfully, but these errors were encountered:
WebKieth
changed the title
Capability with new angular cli 8 custom webpack config
Capability with new angular cli 8 and custom webpack config
Aug 7, 2019
I want to use angular with tailwind css and their
@apply
custom rule. This rule dont work as expected after installing tailwind for angular. Tailwind requires to add it by custom webpack config with minifying all component styles with tailwind inside one bundle. With my current config this@apply
works properly now, but ahead of time compiler says hurtful things....Expected Behavior
Succeed compiling production build by AOT compiler
Actual Behavior
ERROR in Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: Cannot read property 'replace' of undefined
when i try to
ng build --aot
Code
How Do We Reproduce?
Just clone this repo
https://github.com/WebKieth/ngwindy-layout
npm i && ng build --aot
The text was updated successfully, but these errors were encountered: