aboutsummaryrefslogtreecommitdiff
path: root/juick-server/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-06 13:58:40 +0300
committerGravatar Vitaly Takmazov2018-09-07 05:15:51 -0400
commit670913698776e09b7ff44f44ccdcf56303d79be3 (patch)
tree96f932645ab0faf9de6861f89072d1eb4b2622a3 /juick-server/webpack.config.js
parent51489a954463567f8dd50854826c03ce51c45cb3 (diff)
merge legacy www
Diffstat (limited to 'juick-server/webpack.config.js')
-rw-r--r--juick-server/webpack.config.js53
1 files changed, 53 insertions, 0 deletions
diff --git a/juick-server/webpack.config.js b/juick-server/webpack.config.js
new file mode 100644
index 00000000..6605a1ca
--- /dev/null
+++ b/juick-server/webpack.config.js
@@ -0,0 +1,53 @@
+const webpack = require("webpack")
+const MiniCssExtractPlugin = require("mini-css-extract-plugin")
+const StyleLintPlugin = require('stylelint-webpack-plugin')
+
+module.exports = {
+ devtool: 'source-map',
+ entry: {
+ "scripts": [
+ __dirname + "/src/main/assets/scripts.js",
+ require.resolve('evil-icons/assets/evil-icons.js')
+ ],
+ "style": [
+ __dirname + "/src/main/assets/style.css",
+ require.resolve('evil-icons/assets/evil-icons.css'),
+ require.resolve('awesomplete/awesomplete.css')
+ ]
+ },
+ output: {
+ path: __dirname + "/src/main/resources/static",
+ filename: "[name].js"
+ },
+ module: {
+ rules: [
+ { test: /\.jsx?$/, loader: 'eslint-loader', enforce: 'pre', exclude: /node_modules/, options: { failOnWarning: false, failOnError: true, fix: true } },
+ { test: /\.js$/, loader: 'babel-loader' },
+ {
+ test: /\.css$/,
+ use: [
+ MiniCssExtractPlugin.loader,
+ {
+ loader: "css-loader"
+ },
+ {
+ loader: "postcss-loader", options: {
+ plugins: () => [
+ require('autoprefixer')({
+ browsers: 'last 4 versions, > 1%, ie >= 8'
+ })
+ ]
+ }
+ }
+ ]
+ },
+ { test: /\.png$/, loader: "url-loader?limit=10000000000" },
+ { test: /\.svg$/, loader: "url-loader?limit=10000000000" }
+ ]
+ },
+ plugins: [
+ new StyleLintPlugin({ configFile: '.stylelintrc.json', context: 'src/main/assets', files: ['**/*.css'], emitErrors: false }),
+ new MiniCssExtractPlugin({ filename: "style.css", allChunks: true })
+ ],
+
+}