mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
chore(core): monorepo, esm targeting, improved management (#8707)
This commit is contained in:
16
packages/webpack/nativescript-target/index.js
Normal file
16
packages/webpack/nativescript-target/index.js
Normal file
@ -0,0 +1,16 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user