3.3.1-alpha.3 • Published 2 years ago

@nativescript-community/xml-ui-loader v3.3.1-alpha.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

@nativescript-community/xml-ui-loader

npm npm

This loader provides support for using @nativescript-community/xml-ui-compiler in Webpack.

Installation

npm install @nativescript-community/xml-ui-loader --save-dev

Usage

webpack.config.js

const webpack = require('@nativescript/webpack');
const { getEntryDirPath, getPlatformName } = require('@nativescript/webpack/dist/helpers/platform');
const { chainLoaderConfiguration } = require("@nativescript-community/xml-ui-loader/helpers");

module.exports = (env) => {
  webpack.init(env);

  // Learn how to customize:
  // https://docs.nativescript.org/webpack

  webpack.chainWebpack((config) => {
    chainLoaderConfiguration(config, {
      appPath: getEntryDirPath(),
      platform: getPlatformName()
    });
  });

  return webpack.resolveConfig();
};

There are also few preprocessing options that are useful for applying output customizations.

chainLoaderConfiguration(config, {
  appPath: getEntryDirPath(),
  platform: getPlatformName(),
  useDataBinding: false, // Set this to false if you don't want to use data binding system
  preprocess: {
    // Format attribute value
    attributeValueFormatter: (value, attributeName, tagName, attributes) => value.toUpperCase(),
    // Manage AST result
    transformAst: (ast, generateFunc) => generateFunc(ast).code,
  }
});
3.3.0

2 years ago

3.3.1-alpha.1

2 years ago

3.3.1-alpha.0

2 years ago

3.3.1-alpha.3

2 years ago

3.3.1-alpha.2

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.1.0-alpha.1

2 years ago

3.1.0-alpha.2

2 years ago

3.1.0-alpha.3

2 years ago

3.1.0-alpha.4

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

3.0.0-alpha.1

3 years ago

3.0.0-alpha.0

3 years ago

2.0.4

3 years ago

3.0.0-alpha.3

3 years ago

3.0.0-alpha.2

3 years ago

3.0.0-alpha.4

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

3.0.0

3 years ago

2.0.0-alpha.0

3 years ago

2.0.0-alpha.1

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago