React инициализация
This commit is contained in:
+3
-16
@@ -3,14 +3,14 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.ts',
|
||||
entry: './src/index.tsx',
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
clean: true
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts']
|
||||
extensions: ['.js', '.ts', '.jsx', '.tsx']
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -30,21 +30,8 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: "./src/index.hbs",
|
||||
template: "./src/index.html",
|
||||
filename: "index.html"
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: "./src/creators.hbs",
|
||||
filename: "creators.html"
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: "./src/discover.hbs",
|
||||
filename: "discover.html"
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{from: "./src/images", to: "images"},
|
||||
],
|
||||
})
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user