forked from stylescape/page.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.paths.js
54 lines (37 loc) · 1.46 KB
/
webpack.paths.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// webpack.paths.js
// ============================================================================
// Imports
// ============================================================================
import path from "path"
import { fileURLToPath } from "url";
// ============================================================================
// Constants
// ============================================================================
// Convert the current file's URL to a file path
const __filename = fileURLToPath(import.meta.url);
// Derive the directory name of the current module
const __dirname = path.dirname(__filename);
/**
* Paths Webpack Configuration
*
* Defines common paths used throughout the Webpack configuration.
*
* - `src`: Path to the source files.
* - `build`: Path where production build files will be placed.
* - `public`: Path to public/static files to be copied to the build folder.
* - `test`: Path to test files.
*/
const configPaths = {
// Path to source files
src: path.resolve(__dirname, "/src"),
// Path for production build files
build: path.resolve(__dirname, "/dist"),
// Path to public/static files
public: path.resolve(__dirname, "/public"),
// Path for test files
test: path.resolve(__dirname, "/test"),
};
// ============================================================================
// Exports
// ============================================================================
export default configPaths