angular-template-transfer-webpack-plugin
v0.0.1
Published
transfer angular template files to the build directory
Downloads
12
Maintainers
Readme
Transfer Webpack Plugin For Angular Template File
Transfer files to the build directory
Getting started
Install the plugin:
npm install --save-dev angular-template-transfer-webpack-pluginAPI
new AngularTemplateTransferWebpackPlugin(patterns: array, [basePath: string])patterns– array of patterns{ from: 'path', to: 'path' },from– relative tobasePathor tocontextof your config (ifbasePathis not exists),to– relative to the build directorybasePath(optional) – directory to be resolved tofromparameter
Usage
named your template file by .template.html
var AngularTemplateTransferWebpackPlugin = require('angular-template-transfer-webpack-plugin');
module.exports = {
context: path.join(__dirname, 'app'),
plugins: [
new AngularTemplateTransferWebpackPlugin([
{ from: 'i18n', to: 'i18n' },
{ from: 'root' }
])
]
};
module.exports = {
plugins: [
new AngularTemplateTransferWebpackPlugin([
{ from: 'i18n', to: 'i18n' },
{ from: 'root' }
], path.join(__dirname, 'app'))
]
};