Tabnine Logo For Javascript
webpack
Code IndexAdd Tabnine to your IDE (free)

How to use webpack

Best JavaScript code snippets using webpack(Showing top 15 results out of 7,083)

origin: hilongjw/vue-zhihu-daily

webpack(webpackConfig, function (err, stats) {
 spinner.stop()
 if (err) throw err
 process.stdout.write(stats.toString({
  colors: true,
  modules: false,
  children: false,
  chunks: false,
  chunkModules: false
 }) + '\n')
})
origin: hilongjw/vue-zhihu-daily

// force page reload when html-webpack-plugin template changes
compiler.plugin('compilation', function (compilation) {
 compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
  hotMiddleware.publish({ action: 'reload' })
  cb()
 })
})
origin: hilongjw/vue-zhihu-daily

// only apply babel for test files when using isparta
webpackConfig.module.loaders.some(function (loader, i) {
 if (loader.loader === 'babel') {
  loader.include = /test\/unit/
  return true
 }
})
origin: lewis617/react-redux-tutorial

(function initWebpack() {
 var webpack = require('webpack');
 var webpackConfig = require('./webpack.config');
 var compiler = webpack(webpackConfig);

 app.use(require('webpack-dev-middleware')(compiler, {
  noInfo: true, publicPath: webpackConfig.output.publicPath
 }));

 app.use(require('webpack-hot-middleware')(compiler, {
  log: console.log, path: '/__webpack_hmr', heartbeat: 10 * 1000
 }));
})();
origin: Flood-UI/flood

console.log('Creating an optimized production build...');
const compiler = webpack(config);
return new Promise((resolve, reject) => {
 compiler.run((err, stats) => {
   return reject(err);
  const messages = formatWebpackMessages(stats.toJson({}, true));
  if (messages.errors.length) {
   return reject(new Error(messages.errors.join('\n\n')));
origin: cube-js/cube.js

const compiler = webpack(config);
return new Promise((resolve, reject) => {
 compiler.run((err, stats) => {
  } else {
   messages = formatWebpackMessages(
    stats.toJson({ all: false, warnings: true, errors: true })
   );
origin: cube-js/cube.js

new webpack.DefinePlugin(env.stringified),
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
origin: laurent22/joplin

const compiler = webpack(config);
return new Promise((resolve, reject) => {
  compiler.run((err, stats) => {
    } else {
      messages = formatWebpackMessages(
        stats.toJson({ all: false, warnings: true, errors: true })
      );
origin: laurent22/joplin

new webpack.DefinePlugin(env.stringified),
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
origin: laurent22/joplin

new webpack.DefinePlugin(env.stringified),
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
origin: cube-js/cube.js

const compiler = webpack(config);
return new Promise((resolve, reject) => {
 compiler.run((err, stats) => {
  } else {
   messages = formatWebpackMessages(
    stats.toJson({ all: false, warnings: true, errors: true })
   );
origin: laurent22/joplin

const compiler = webpack(config);
return new Promise((resolve, reject) => {
  compiler.run((err, stats) => {
    } else {
      messages = formatWebpackMessages(
        stats.toJson({ all: false, warnings: true, errors: true })
      );
origin: cube-js/cube.js

new webpack.DefinePlugin(env.stringified),
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
origin: laurent22/joplin

new webpack.DefinePlugin(env.stringified),
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
origin: laurent22/joplin

new webpack.DefinePlugin(env.stringified),
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
webpack(npm)

JSDoc

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.

Most used webpack functions

  • webpack
  • Stats.toJson
    Returns compilation information as a JSON object.
  • Stats.toString
    Returns a formatted string of the compilation information (similar to CLI output).
  • optimize
  • DefinePlugin
  • CommonsChunkPlugin,
  • Stats.hasErrors,
  • Compiler.plugin,
  • Compiler.run,
  • HotModuleReplacementPlugin,
  • HashedModuleIdsPlugin,
  • ModuleConcatenationPlugin,
  • Stats.compilation,
  • ToJsonOutput.errors,
  • Compiler.watch,
  • Compilation.errors,
  • OccurenceOrderPlugin,
  • ToJsonOutput.warnings,
  • Compiler.outputPath

Popular in JavaScript

  • axios
    Promise based HTTP client for the browser and node.js
  • minimist
    parse argument options
  • commander
    the complete solution for node.js command-line programs
  • moment
    Parse, validate, manipulate, and display dates
  • mime-types
    The ultimate javascript content-type utility.
  • glob
    a little globber
  • semver
    The semantic version parser used by npm.
  • webpack
    Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now