While attempting to utilize blueprintjs and importing its CSS, I believe I may have misconfigured my webpack setup. This resulted in the following error https://i.sstatic.net/eErly.png
Below is my webpack configuration:
const ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpack = require("webpack");
var path = require("path");
module.exports={
entry: './src/index.js',
output:{
path: __dirname + "/public",
filename:'bundle.js',
publicPath: "/public/"
},
devServer: {
inline: true,
contentBase: './public',
port: 3000
},
module:{
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: "babel-loader",
query: {
presets: ['es2015', 'react', 'stage-0'],
}
},
{
test: /\.s(a|c)ss$/,
loader: ExtractTextPlugin.extract({loader: ['css-loader', 'sass-loader', 'style-loader']})
},
{
test: /\.css$/,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
},
],
},
{
test: /\.(|gif||svg|woff|woff2|eot|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader', options: {name: '[name].[ext]'}
}, {
test: /\.(png|jpg|)$/,
loader: 'url-loader?limit=200000'
},
]
},
plugins: [
new ExtractTextPlugin("styles.css"),
]
}
The packages I am using are "webpack": "^2.7.0", "@blueprintjs/core": "^1.34.1" along with several loaders.
I attempted importing my CSS in two ways:
require('!css-loader!./index.css');
And also:
import styles from './index.css'
However, both methods yielded the same result. After spending additional time troubleshooting, I encountered this error:
https://i.sstatic.net/4EKdy.png At this point, I am uncertain about the issue with my webpack setup and how to resolve it. Any advice or suggestions would be greatly appreciated.