-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
26 lines (25 loc) · 855 Bytes
/
webpack.config.js
File metadata and controls
26 lines (25 loc) · 855 Bytes
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
const path = require('path');
module.exports = {
entry: './src/index.browser.ts', // Use your entry point here
output: {
filename: 'flowquery.min.js', // The output file for the browser
path: path.resolve(__dirname, 'dist'),
library: 'FlowQuery', // Expose your module as a global variable
libraryTarget: 'umd', // Ensure compatibility with various module systems
libraryExport: 'default', // Export only the default export
},
resolve: {
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
mode: 'production', // Use 'development' for unminified output
target: 'web', // Ensure the build is targeted for browsers
};