Completed
Pull Request — master (#290)
by korelstar
33:10
created

webpack.common.js (10 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
const path = require('path')
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
2
const webpack = require('webpack')
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
3
const { VueLoaderPlugin } = require('vue-loader')
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
Backwards Compatibility introduced by
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
4
const StyleLintPlugin = require('stylelint-webpack-plugin')
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
5
6
module.exports = {
7
	entry: path.join(__dirname, 'src', 'main.js'),
8
	output: {
9
		path: path.resolve(__dirname, './js'),
10
		publicPath: '/js/',
11
		filename: 'notes.js',
12
		chunkFilename: 'chunks/[name].js'
13
	},
14
	module: {
15
		rules: [
16
			{
17
				test: /\.css$/,
18
				use: ['vue-style-loader', 'css-loader']
19
			},
20
			{
21
				test: /\.scss$/,
22
				use: ['vue-style-loader', 'css-loader', 'sass-loader']
23
			},
24
			{
25
				test: /\.vue$/,
26
				loader: 'vue-loader'
27
			},
28
			{
29
				test: /\.js$/,
30
				loader: 'babel-loader',
31
				exclude: /node_modules/
32
			},
33
			{
34
				test: /\.(png|jpg|gif|svg)$/,
35
				loader: 'file-loader',
36
				options: {
37
					name: '[name].[ext]?[hash]'
38
				}
39
			}
40
		]
41
	},
42
	plugins: [
43
		new VueLoaderPlugin(),
44
		new StyleLintPlugin(),
45
		new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
46
	],
47
	resolve: {
48
		extensions: ['*', '.js', '.vue', '.json']
49
	}
50
}
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
51