GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #6844 from swederik/issue-6843 · webpack/webpack@fc2feaf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • WebpackOptionsDefaulter.js
  • test/configCases/source-map/object-as-output-library
    • index.js
    • webpack.config.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/WebpackOptionsDefaulter.js‎

Copy file name to clipboardExpand all lines: lib/WebpackOptionsDefaulter.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
136136
this.set("output.devtoolNamespace", "make", options => {
137137
if (Array.isArray(options.output.library))
138138
return options.output.library.join(".");
139+
else if (typeof options.output.library === "object")
140+
return options.output.library.root || "";
139141
return options.output.library || "";
140142
});
141143
this.set("output.libraryTarget", "var");
Collapse file

‎test/configCases/source-map/object-as-output-library/index.js‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
it("should compile successfully when output.library is an object of type:name", function() {});
Collapse file

‎test/configCases/source-map/object-as-output-library/webpack.config.js‎

Copy file name to clipboard
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
devtool: "source-map",
3+
output: {
4+
library: {
5+
root: "[name]",
6+
amd: "[name]",
7+
commonjs: "[name]"
8+
},
9+
libraryTarget: "umd"
10+
}
11+
};

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.