Welcome to mirror list, hosted at ThFree Co, Russian Federation.

webpack.config.js - github.com/okkur/syna.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 679e2b0e8f9d0b0558d8aae341277a6f3fa79960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const path = require('path');

module.exports = {
  entry: {
    head: './assets/js/head.js',
    main: './assets/js/index.js',
    collapse: './assets/js/collapse.js',
    contact: './assets/js/contact.js',
    content: './assets/js/content.js',
    graph: './assets/js/graph.js',
    hero: './assets/js/hero.js',
    portfolio: './assets/js/portfolio.js',
    pricing: './assets/js/pricing.js',
    react: './assets/js/react.js',
    search: './assets/js/search.js',
    stripe: './assets/js/stripe.js',
    'dev-jq-helpers': './assets/js/helpers/jq-helpers.js'
  },
  output: {
    path: path.resolve('./'),
    filename: (pathData) => {
      return pathData.chunk.name.indexOf('dev') === 0 ? 'exampleSite/static/scripts/[name].js': 'assets/scripts/syna-[id].js';
    },
  },
  resolve: {
    extensions: ['.js', '.jsx'],
    modules: [path.join(process.cwd(), 'src'), 'node_modules'],
  },
  mode: process.env === 'production' ? 'production' : 'development',
  module: {
    rules: [{
      test: /\.jsx?$/,
      exclude: /node_modules/,
      use: {
        loader: 'babel-loader',
        options: {
          presets: ['@babel/env', '@babel/react'],
        },
      },
    }],
  },
  plugins: [],
};