javascript 示例Basic Webpack Config

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 示例Basic Webpack Config相关的知识,希望对你有一定的参考价值。

var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');

module.exports = {
  context: __dirname,
  devtool: debug ? "inline-sourcemap" : null,
  entry: "./js/scripts.js",
  output: {
    path: __dirname + "/js",
    filename: "scripts.min.js"
  },
  plugins: debug ? [] : [
    new webpack.optimize.DedupePlugin(),
    new webpack.optimize.OccurenceOrderPlugin(),
    new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
  ],
};

以上是关于javascript 示例Basic Webpack Config的主要内容,如果未能解决你的问题,请参考以下文章

webpac入门

python Python示例:basic_list

javascript Basic Express JS Server

javascript LocalStorage Basic Useg

Basic JavaScript: Counting Cards

Basic JavaScript: Counting Cards