csstools/precss

Module build failed: Error: Failed to find

Closed this issue · 3 comments

  1. used create-react-app eject for webpack config.
  2. Added precss to the config:
       loader: require.resolve('postcss-loader'),
            options: {
              // Necessary for external CSS imports to work
              // https://github.com/facebookincubator/create-react-app/issues/2677
              ident: 'postcss',
              sourceMap: false,
              plugins: (webpack) => [
                require('precss')({}),//tried this too. require('precss'),
                require('postcss-flexbugs-fixes'),
                autoprefixer({
                  browsers: [
                    '>1%',
                    'last 4 versions',
                    'Firefox ESR',
                    'not ie < 9', // React doesn't support IE8 anyway
                  ],
                  flexbox: 'no-2009',
                }),
              ],

            },
}
  1. Error:
    Moved src/App.css to src/abc/_App.css and made an import in src/index.css
    @import 'abc/App';
Module build failed: Error: Failed to find 'abc/App'

I'm having similar issue

webpack-contrib/postcss-loader#291

its and import related issue. since variables mentioned in the same file do get processed by precss

Closing due to inactivity and this comment.