Skip to content
Snippets Groups Projects
Select Git revision
  • 422dd10aa56a54933f3485af38583e10af7b3f6a
  • master default protected
  • rednatco-v2
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • servers
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

webpack.config.js

Blame
  • webpack.config.js 1.53 KiB
    const path = require('path');
    const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
    const ExtractTextPlugin = require('extract-text-webpack-plugin');
    module.exports = {
        module: {
            rules: [
                {
                    loader: 'raw-loader',
                    test: /\.(glsl|frag|vert)$/,
                    include: [ path.resolve(__dirname, 'build/node_modules/') ],
                },
                {
                    loader: 'glslify-loader',
                    test: /\.(glsl|frag|vert)$/,
                    include: [ path.resolve(__dirname, 'build/node_modules/') ]
                },
    
                {
                    loader: 'file-loader',
                    test: /\.(woff2?|ttf|otf|eot|svg|html)$/,
                    include: [ path.resolve(__dirname, 'build/node_modules/') ],
                    options: {
                        name: '[name].[ext]'
                    }
                },
                {
                    test:/\.(s*)css$/,
                    use: ExtractTextPlugin.extract({
                        fallback:'style-loader',
                        use:['css-loader', 'resolve-url-loader', 'sass-loader'],
                    })
                }
            ]
        },
        plugins: [
            new ExtraWatchWebpackPlugin({
                files: [
                    './build/node_modules/**/*.vert',
                    './build/node_modules/**/*.frag',
                    './build/node_modules/**/*.glsl',
                    './build/node_modules/**/*.scss',
                    './build/node_modules/**/*.html'
                ],
            }),
            new ExtractTextPlugin({ filename:'app.css' }),
        ],
    }