Last active
July 17, 2018 19:37
-
-
Save ssougnez/32dc4f1430bd84bf5844a8b013df1654 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
module.exports = { | |
mode: "development", | |
entry: { | |
adb: "./app/index.ts" | |
}, | |
output: { | |
path: path.resolve(__dirname, "../AnotherDevBlog"), | |
filename: "Scripts/[name].min.js", | |
publicPath: "/" | |
}, | |
resolve: { | |
extensions: ['.ts', '.js'] | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.ts$/, | |
use: 'ts-loader', | |
exclude: /node_modules/ | |
}, | |
{ | |
test: /\.html$/, | |
use: ['ngtemplate-loader', 'html-loader'] | |
}, | |
{ | |
test: /\.css$/, | |
use: [MiniCssExtractPlugin.loader, "css-loader"] | |
}, | |
{ | |
test: /\.(jpe?g|png)$/, | |
use: "file-loader?name=img/[name].[ext]" | |
} | |
] | |
}, | |
plugins: [ | |
new MiniCssExtractPlugin({ | |
filename: "css/[name].min.css" | |
}) | |
], | |
optimization: { | |
splitChunks: { | |
cacheGroups: { | |
commons: { | |
test: /[\\/]node_modules[\\/]/, | |
name: "vendors", | |
chunks: "all" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment