This repository was archived by the owner on Jun 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathwebpack.config.js
More file actions
62 lines (61 loc) · 1.66 KB
/
webpack.config.js
File metadata and controls
62 lines (61 loc) · 1.66 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
50
51
52
53
54
55
56
57
58
59
60
61
62
const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const MergeIntoSingleFilePlugin = require("webpack-merge-and-include-globally");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry: [
path.resolve(__dirname, "src", "main.js"),
path.resolve(__dirname, "src", "main.scss"),
],
output: {
path: path.join(__dirname, "dist"),
filename: "dist.js"
},
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
{
loader: "sass-loader",
options: {
sassOptions: {
includePaths: [
"src/main.scss"
],
},
},
},
],
},
],
},
plugins: [
new MiniCssExtractPlugin({
filename: "dist.css"
}),
new MergeIntoSingleFilePlugin({
files: {
"vendor.js": [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/bootstrap/dist/js/bootstrap.min.js',
'node_modules/summernote/dist/summernote.min.js',
'node_modules/@standardnotes/component-relay/dist/dist.js',
'node_modules/dompurify/dist/purify.min.js',
'node_modules/sn-stylekit/dist/stylekit.js'
],
"vendor.css": [
'node_modules/bootstrap/dist/css/bootstrap.min.css',
'node_modules/summernote/dist/summernote.min.css',
'node_modules/sn-stylekit/dist/stylekit.css'
]
}
}),
new HtmlWebpackPlugin({
title: "Plus Editor",
template: "editor.index.ejs"
})
],
};