Closed donfmorrison closed 5 years ago
Hello there @donfmorrison ,
Thank you for your interest in working with our products and for telling us about this issue.
Right now I am not at my desk, and I can't test for myself, but I believe I think I've found what the issue is.
Could you please change the webpack.config.js
to this:
import path from "path";
import HtmlWebpackPlugin from "html-webpack-plugin";
module.exports = {
entry: path.join(__dirname,'src','index.js'),
output: {
path: path.join(__dirname,'build'),
filename: 'index.bundle.js'
},
mode: process.env.NODE_ENV || 'development',
resolve: {
modules: [path.resolve(__dirname,'src'),'node_modules'],
extensions: [ '.js', '.jsx' ]
},
devServer: {
contentBase: path.join(__dirname,'src')
},
plugins: [
new HtmlWebpackPlugin({
template: path.join(__dirname,'src','index.html')
})
],
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader']
},
{
test: /\.(css|scss)$/,
use: [
"style-loader",
"css-loader",
"sass-loader"
]
},
{
// i've added here the fonts extensions
// from your warnings, it may seem so that this will fix the problem
test: /\.(jpg|jpeg|png|gif|mp3|svg|ttf|woff2|woff|eot)$/,
loaders: ["file-loader"]
}
]
}
};
Could you let me know if that worked? I think tomorrow I'll be able to get my hands on a PC and make some tests.
Best, Manu
Yep! That did it. Working good now.
Thank you, @EINazare
!!! IF YOU DO NOT USE THIS ISSUES TEAMPLATE, YOUR ISSUE IS LIABLE TO BEING IGNORED BY US
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
I followed your YouTube tutorial series https://www.youtube.com/watch?v=5Vt08L5EgHc to use webpack and babel; but, instead of using the src files from material-dashboard-pro-react I used source from paper-dashboard-pro-react.
Expect webpack should build without errors.
Current Behavior
webpack fails to build, errors indicate issues with nucleo-icons - see log below
Failure Information (for bugs)
Probably a config error on my part...
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Part 3
as starting pointsrc
directory ofPart 3
withsrc
directory from ct-paper-dashboard-pro-reactmodify contents of index.html
package.json
to those required by paper-dashboard-pro-reactnpm run webpack
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
Please include any relevant log snippets or files here.