Whenever I attempt to run gulp scripts, it gives me the following error message:
ERROR: Entry module not found
Error: Unable to resolve 'C:/Users/milan/Local Sites/project-university/app/public/wp-content/themes/fictional-university-theme/js/scripts.js' in 'C:\Users\milan\Local Sites\project-university\app\public'
Here is my webpack.config.js:
const path = require('path'),
settings = require('./settings');
module.exports = {
entry: {
App: settings.themeLocation + "js/scripts.js"
},
output: {
path: path.resolve(__dirname, settings.themeLocation + "js"),
filename: "scripts-bundled.js"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
},
mode: 'development'
}
And here is my settings.js:
exports.urlToPreview = 'http://project-university.local/';
exports.themeLocation =
'C:/Users/milan/Local Sites/project-university/app/public/wp-content/themes/fictional-university-theme/';
Below, you can see my file directory:
Project---- app------ public----------(wordpress content files)