-
-
Save anton-gorbikov/63ecb12ce354171e5d9c7236464b65ac 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 { CleanWebpackPlugin } = require('clean-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const StylelintPlugin = require('stylelint-webpack-plugin'); | |
module.exports = { | |
entry: './dist/app/main.js', | |
devServer: { | |
contentBase: './dist/app', | |
historyApiFallback: true, | |
host: '0.0.0.0', | |
port: 4200 | |
}, | |
plugins: [ | |
new CleanWebpackPlugin(), | |
new HtmlWebpackPlugin({ | |
title: 'Theater', | |
template: './src/index.html' | |
}), | |
new StylelintPlugin({ | |
configFile: 'stylelint.config.js', | |
context: './src', | |
files: '**/*.css', | |
fix: true | |
}) | |
], | |
output: { | |
filename: 'main.js', | |
path: path.resolve(__dirname, 'dist/app') | |
}, | |
module: { | |
rules: [{ | |
test: /\.css$/, | |
use: [ | |
'style-loader', | |
'css-loader', | |
'postcss-loader' | |
] | |
}] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment