typescript и handlebars
This commit is contained in:
+14
-3
@@ -3,16 +3,27 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
entry: './src/index.ts',
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
clean: true
|
||||
},
|
||||
module: {},
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts']
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\.(ts|tsx)$/, loader: "ts-loader" },
|
||||
{
|
||||
test: /\.hbs$/,
|
||||
loader: 'handlebars-loader',
|
||||
},
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: "./src/index.html"
|
||||
template: "./src/index.hbs"
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
|
||||
Reference in New Issue
Block a user