When running the following command:
node .\node_modules\webpack\bin\webpack.js --config scripts/webpack.config.js --display-error-details
An error is generated with the following details.
Currently, I am testing the script and my application.ts file only contains the following code snippet:
export class Aureus {
constructor() {
alert('1');
}
}
The webpack configuration file is structured as follows:
const globule = require("globule");
const path = require("path");
const webpack = require("webpack");
const extractTextPlugin = require("extract-text-webpack-plugin");
const config = {
// Configuration goes here...
};
const configuration = {
// Webpack configuration settings...
};
module.exports = configuration;
The specific error message reads as follows:
I'm encountering an error related to the location of 'application.ts'. This file can be found at ./scripts/application.ts
, within the same directory as webpack.config.js.
ERROR in Entry module not found: Error: Can't resolve 'application.ts' in 'C:\Projects\Github\Aureus\Aureus.Web\scripts'
resolve 'application.ts' in 'C:\Projects\Github\Aureus\Aureus.Web\scripts'
Parsed request is a module
using description file: C:\Projects\Github\Aureus\Aureus.Web\package.json (relative path: ./scripts)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:\Projects\Github\Aureus\Aureus.Web\package.json (relative path: ./scripts)
resolve as module
...