Skip to content

Commit b5c4d9f

Browse files
committed
Add atom target.
1 parent 1c406a6 commit b5c4d9f

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

‎lib/WebpackOptionsApply.js‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,35 @@ WebpackOptionsApply.prototype.process = function(options, compiler) {
112112
new LoaderTargetPlugin("node-webkit")
113113
);
114114
break;
115+
case "atom":
116+
var JsonpTemplatePlugin = require("./JsonpTemplatePlugin");
117+
var NodeTargetPlugin = require("./node/NodeTargetPlugin");
118+
var ExternalsPlugin = require("./ExternalsPlugin");
119+
compiler.apply(
120+
new JsonpTemplatePlugin(options.output),
121+
new FunctionModulePlugin(options.output),
122+
new NodeTargetPlugin(),
123+
new ExternalsPlugin("commonjs", "app"),
124+
new ExternalsPlugin("commonjs", "auto-updater"),
125+
new ExternalsPlugin("commonjs", "browser-window"),
126+
new ExternalsPlugin("commonjs", "content-tracing"),
127+
new ExternalsPlugin("commonjs", "dialog"),
128+
new ExternalsPlugin("commonjs", "global-shortcut"),
129+
new ExternalsPlugin("commonjs", "ipc"),
130+
new ExternalsPlugin("commonjs", "menu"),
131+
new ExternalsPlugin("commonjs", "menu-item"),
132+
new ExternalsPlugin("commonjs", "power-monitor"),
133+
new ExternalsPlugin("commonjs", "protocol"),
134+
new ExternalsPlugin("commonjs", "tray"),
135+
new ExternalsPlugin("commonjs", "remote"),
136+
new ExternalsPlugin("commonjs", "web-view"),
137+
new ExternalsPlugin("commonjs", "clipboard"),
138+
new ExternalsPlugin("commonjs", "crash-reporter"),
139+
new ExternalsPlugin("commonjs", "screen"),
140+
new ExternalsPlugin("commonjs", "shell"),
141+
new LoaderTargetPlugin("atom")
142+
);
143+
break;
115144
default:
116145
throw new Error("Unsupported target '" + options.target + "'.");
117146
}

0 commit comments

Comments
 (0)