aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-03-18 03:55:30 +0100
committerMax Magorsch <arzano@gentoo.org>2020-03-18 03:55:30 +0100
commitef2794e3cac14bf3e716f89a178ee15138e1aa62 (patch)
tree9ba24bb8a704d1053366cac27b24eb0829e292b5 /webpack.config.js
downloadsoko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.tar.gz
soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.tar.bz2
soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.zip
Initial commit containing v0.1.0 of Soko
This is a rewrite of packages.g.o based on postgres and git written in Go. Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js69
1 files changed, 69 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..a3be9c4
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,69 @@
+const webpack = require('webpack');
+const path = require('path');
+
+module.exports = {
+ entry: {
+ stylesheets: './web/packs/stylesheets.js',
+ application: './web/packs/application.js',
+ index: './web/packs/index.js',
+ packages: './web/packs/packages.js',
+ useflags: './web/packs/useflags.js',
+ },
+ output: {
+ path: path.resolve(__dirname, 'assets'),
+ filename: '[name].js',
+ },
+ plugins: [
+ require('postcss-import')
+ ],
+ module: {
+ rules: [
+ {
+ test: /\.s[ac]ss$/i,
+ use: [
+ // Creates `style` nodes from JS strings
+ 'style-loader',
+ // Translates CSS into CommonJS
+ {
+ loader: 'css-loader',
+ },{
+ loader: 'resolve-url-loader',
+ },
+ // Compiles Sass to CSS
+ {
+ loader: 'sass-loader',
+ options: {
+ sourceMap: true,
+ }
+ },
+ ],
+ },
+ {
+ test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
+ use: [
+ {
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]',
+ publicPath: '/assets'
+ }
+ }
+ ]
+ }
+ ],
+ },
+ plugins: [
+ new webpack.ProvidePlugin({
+ $: 'jquery',
+ jQuery: 'jquery',
+ 'window.jQuery': 'jquery',
+ 'windows.jQuery': 'jquery',
+ tether: 'tether',
+ Tether: 'tether',
+ 'window.Tether': 'tether',
+ Popper: ['popper.js', 'default'],
+ 'window.Tether': 'tether',
+ Modal: 'exports-loader?Modal!bootstrap/js/dist/modal',
+ }),
+ ],
+};