How to use webpack-watched-glob-entries-plugin - 3 common examples

To help you get started, we’ve selected a few webpack-watched-glob-entries-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github arx-8 / swagger-viewer / swagger-viewer / webextension-toolbox-config.js View on Github external
webpack: (config) => {
    // for Debug (JSON.stringifyでは一部の型のtoStringがnullになってしまうため、console.log(confg)も併用した方がよい)
    // console.log(JSON.stringify(config))

    // for TypeScript build
    config.resolve.extensions = [
      ...config.resolve.extensions,
      ...[".ts", ".tsx"],
    ]

    config.entry = GlobEntriesPlugin.getEntries([
      resolve("app", "*.{js,mjs,jsx,ts,tsx}"),
      resolve("app", "?(scripts)/*.{js,mjs,jsx,ts,tsx}"),
    ])

    config.module.rules.push({
      test: /\.tsx?$/,
      use: [
        {
          loader: "babel-loader",
          options: babelOptions,
        },
      ],
    })

    config.module.rules.push({
      test: /\.css/,
github webextension-toolbox / webextension-toolbox / src / webpack-config.js View on Github external
// Source-Maps
  config.devtool = devtool

  /******************************/
  /*       WEBPACK.ENTRY        */
  /******************************/
  const entries = []

  // Add main entry glob
  entries.push(resolve(src, '*.{js,mjs,jsx}'))
  entries.push(resolve(src, '?(scripts)/*.{js,mjs,jsx}'))

  // We use the GlobEntriesPlugin in order to
  // restart the compiler in watch mode, when new
  // files got added.
  config.entry = GlobEntriesPlugin.getEntries(
    entries
  )

  /******************************/
  /*       WEBPACK.OUTPUT       */
  /******************************/
  config.output = {
    path: target,
    filename: '[name].js',
    chunkFilename: '[id].chunk.js'
  }
  /******************************/
  /*    WEBPACK.OPTIMIZATION    */
  /******************************/
  config.optimization = { minimize: minimize }
github justintadlock / mythic / resources / build / webpack.config.js View on Github external
module.exports = env => {

        return {
                // Set the mode based on whether we're in production or dev.
                mode : env.production ? 'production' : 'development',

                // Only generate source maps if we're in a dev environment.
                devtool : env.production ? undefined : 'source-maps',

                entry : WebpackWatchedGlobEntries.getEntries( config.entry ),

                output : {
                        path     : config.paths.dist,
                        filename : config.output.scripts.filename
                },

                // Console stats output.
                // @link https://webpack.js.org/configuration/stats/#stats
                stats : 'minimal',

                // External objects.
                externals : config.externals,

                // Resolve settings.
                resolve : config.resolve,

webpack-watched-glob-entries-plugin

Webpack plugin to glob directories for entry files and also watch them for changes

MIT
Latest version published 27 days ago

Package Health Score

75 / 100
Full package analysis

Popular webpack-watched-glob-entries-plugin functions

Similar packages