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
semantic.min.css:1 Uncaught Error: Module parse failed: Unexpected character '@' (11:0) You may need an appropriate loader to handle this file type. | * | */ > @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin);/*! | * # Semantic UI 2.4.0 - Reset #6771
Comments
Same problem to me, any suggestion? |
i've the same problem |
I had a similar issue - it turned out that the configuration of the exclude/include rule options were incorrect |
node_modules/semantic-ui-css/semantic.min.css:11 SyntaxError: Invalid or unexpected token any help please ?? |
I add the require in index.less:
then import the index.less in App.js:
It works for me. |
Hi @yanwii.
Can someone tell why this is happening? |
Hey, @builtbybo |
@yanwii |
I found @yanwii 's suggestion worked for me - Thank you!
This was instead of the usual css-loader/style-loader, with its test of /.css$/i I then added The file 'public/ts/index.less' contains: |
Here is my webpack.config.js
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: './src/index.html',
filename: './index.html',
inject: 'body',
output: {
path: '/dist', //
dist
is the destinationfilename: 'bundle.js',
},
favicon: './src/assets/images/react_js-512.png',
// alias: {
// 'themes/default/assets': path.resolve(__dirname, '../../node_modules/semantic-ui-css/themes/default/assets'),
// }
});
module.exports = {
module: {
rules: [{
test: /.scss$/, // /.(s*)css$/,
exclude: /node_modules/,
use: [
{
loader: "style-loader",
options: {
singleton: true
}
},
{
loader: "css-loader",
options: {
modules: true,
url: true,
sourceMap: true,
}
},
{
loader: "sass-loader"
},
},
plugins: [HtmlWebpackPluginConfig]
}
Any help will be appreciated.
The text was updated successfully, but these errors were encountered: