-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working? #10
Comments
Same problem here. wepback 3.6.0 |
+1 |
2 similar comments
+1 |
+1 |
+1 Webpack 3.8.1 |
I just got this to work in my setup, here is my webpack config...
|
+1 Not working for me in webpack 3.8.1 |
I met this problem and solved it. Before reading below, make sure My folders are as follows:
I want to import all App.jsx import './App.scss'; App.scss @import 'home/_home.scss'; _home.scss @import './**/_index.scss'; Then I met the same error: I did some debugging and found that the I am not familiar with webpack. I guess that only scss files which are imported by jsx files directly are parsed by Then I changed it this way: App.jsx import './App.scss'; App.scss @import 'home/_home.scss';
@import 'home/**/_index.scss'; _home.scss // import nothing Well, it worked. |
Can't seem to get this to work with Webpack 3.3.0, it keeps saying
File to import not found or unreadable: ./bike-components/**/*.scss
. I have a styles.scss file, in which i import 'bike-components/**/*.scss. Folders are as follows:`
var path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const extractSass = new ExtractTextPlugin({
filename: "[name].css",
disable: process.env.NODE_ENV === "development"
});
module.exports = {
entry: {
a: "./src/script/main.js",
styles: "./src/styles/styles.scss",
},
output: {
path: path.join(__dirname, "site/dist"),
filename: "[name].entry.js"
},
module: {
rules: [{
test: /.scss/,
enforce: "pre",
loader: "import-glob-loader",
},
{
test: /.scss$/,
use: extractSass.extract({
use: [{
loader: "css-loader", options: {
sourceMap: true,
minimize: true,
importLoaders: 2,
}
}, {
loader: "sass-loader",
options: {
includePaths: [
"src/styles",
"node_modules/foundation-sites/scss",
"node_modules/slick-carousel/slick",
],
sourceMap: true,
minimize: true,
importLoaders: 2,
}
}],
// use style-loader in development
fallback: "style-loader",
})
}]
},
plugins: [
extractSass
]
};
`
The text was updated successfully, but these errors were encountered: