aboutsummaryrefslogtreecommitdiff
path: root/vnext
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-03-06 08:39:07 +0300
committerGravatar Vitaly Takmazov2023-03-06 08:39:07 +0300
commit5c3c6b9e3e12b28efce9937fde29490f7d5b7a59 (patch)
treee20b6e34014e37c1250177796a02a215f0491efe /vnext
parent7f7d6dcbc7fbce6ff6c9171823ebe7a78604e85d (diff)
vnext: live-server -> webpack-dev-server
Diffstat (limited to 'vnext')
-rw-r--r--vnext/webpack.config.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js
index d8b7a076..a4bc0081 100644
--- a/vnext/webpack.config.js
+++ b/vnext/webpack.config.js
@@ -1,4 +1,5 @@
const ESLintPlugin = require('eslint-webpack-plugin');
+const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = (env, argv) => {
@@ -8,7 +9,7 @@ module.exports = (env, argv) => {
mode: node_env,
devtool: dev ? 'source-map' : false,
entry: {
- 'scripts': [
+ 'index': [
__dirname + '/src/index.js'
]
},
@@ -26,6 +27,19 @@ module.exports = (env, argv) => {
],
loader: 'babel-loader'
}, {
+ test: /\.(css)$/,
+ use: [
+ {
+ loader: dev ? 'style-loader' : MiniCssExtractPlugin.loader,
+ },
+ {
+ loader: 'css-loader',
+ options: {
+ sourceMap: true,
+ },
+ }
+ ],
+ }, {
test: /\.(png|jpe?g|gif|svg)$/i,
use: [
{