mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
17 lines
691 B
JavaScript
17 lines
691 B
JavaScript
module.exports = function nativescriptTarget(compiler) {
|
|
const options = this;
|
|
const webpackLib = "webpack/lib";
|
|
|
|
// Custom template plugin
|
|
const NsJsonpTemplatePlugin = require("./NsJsonpTemplatePlugin");
|
|
|
|
const FunctionModulePlugin = require(webpackLib + "/FunctionModulePlugin");
|
|
const NodeSourcePlugin = require(webpackLib + "/node/NodeSourcePlugin");
|
|
const LoaderTargetPlugin = require(webpackLib + "/LoaderTargetPlugin");
|
|
|
|
new NsJsonpTemplatePlugin(options.output).apply(compiler);
|
|
new FunctionModulePlugin(options.output).apply(compiler);
|
|
new NodeSourcePlugin(options.node).apply(compiler);
|
|
new LoaderTargetPlugin("web").apply(compiler);
|
|
}
|