forked from surveyjs/survey-pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.fonts.js
31 lines (26 loc) · 735 Bytes
/
webpack.fonts.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
"use strict";
const webpackCommonConfigCreator = require("./webpack.config");
var path = require("path");
const { merge } = require("webpack-merge");
var packageJson = require("./package.json");
const config = {
entry: {
"survey.pdf.fonts": path.resolve(__dirname, "./src/fonts.ts"),
},
externals: {
"survey-pdf": {
root: "SurveyPDF",
commonjs2: "survey-pdf",
commonjs: "survey-pdf",
amd: "survey-pdf"
}
}
};
module.exports = function (options) {
options.platform = "pdf";
options.libraryName = "SurveyPdfFonts";
const mainConfig = webpackCommonConfigCreator(options);
delete mainConfig.entry["survey.pdf"];
mainConfig.plugins.shift();
return merge(mainConfig, config);
};