-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathwebpack.config.js
More file actions
49 lines (47 loc) · 1.3 KB
/
webpack.config.js
File metadata and controls
49 lines (47 loc) · 1.3 KB
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
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const devMode = process.env.NODE_ENV !== "production";
const path = require('node:path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'js/main.js',
path: path.resolve(__dirname, 'assets-webpack'),
library: {
name: 'nhsce',
type: 'umd',
},
},
optimization: {
minimize: false,
},
module: {
rules: [
{
test: /\.css$/i,
use: [
//"style-loader",
MiniCssExtractPlugin.loader,
"css-loader"],
},
],
},
plugins:
[
new MiniCssExtractPlugin(
{
// Options similar to the same options in webpackOptions.output
// all options are optional
filename: "css/[name].css",
chunkFilename: "[id].css",
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),
new CopyPlugin({
patterns: [
{ from: "node_modules/reveal.js-menu/", to: "reveal.js-menu/" },
//{ from: "node_modules/reveal.js-menu/font-awesome/", to: "reveal.js-menu/font-awesome/" },
//{ from: "node_modules/reveal.js-menu/menu.css", to: "reveal.js-menu/menu.css" },
],
}),
],
};