0.0.1 • Published 7 years ago
angular-template-transfer-webpack-plugin v0.0.1
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-plugin
API
new AngularTemplateTransferWebpackPlugin(patterns: array, [basePath: string])
patterns
– array of patterns{ from: 'path', to: 'path' }
,from
– relative tobasePath
or tocontext
of your config (ifbasePath
is not exists),to
– relative to the build directorybasePath
(optional) – directory to be resolved tofrom
parameter
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'))
]
};
0.0.1
7 years ago