mirror of
https://github.com/abhijithvijayan/web-extension-starter.git
synced 2025-10-07 07:22:37 +02:00
add lint scripts & apply lint fixes
This commit is contained in:
parent
a04a8e25d6
commit
c308afa91b
@ -9,7 +9,9 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"start": "webpack-dev-server"
|
||||
"start": "webpack-dev-server",
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.6.4",
|
||||
|
||||
@ -1 +1 @@
|
||||
console.log("Hello World from background main file!");
|
||||
console.log('Hello World from background main file!');
|
||||
|
||||
@ -1 +1 @@
|
||||
console.log("Hello World from options main file!");
|
||||
console.log('Hello World from options main file!');
|
||||
|
||||
@ -1 +1 @@
|
||||
console.log("Hello World from popup main file!");
|
||||
console.log('Hello World from popup main file!');
|
||||
|
||||
@ -26,61 +26,61 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
mode: 'development',
|
||||
|
||||
entry: {
|
||||
background: './src/scripts/background.js',
|
||||
popup: './src/scripts/popup.js',
|
||||
options: './src/scripts/options.js'
|
||||
},
|
||||
entry: {
|
||||
background: './src/scripts/background.js',
|
||||
popup: './src/scripts/popup.js',
|
||||
options: './src/scripts/options.js',
|
||||
},
|
||||
|
||||
output: {
|
||||
filename: '[name].[chunkhash].js',
|
||||
path: path.resolve(__dirname, 'extension')
|
||||
},
|
||||
output: {
|
||||
filename: '[name].[chunkhash].js',
|
||||
path: path.resolve(__dirname, 'extension'),
|
||||
},
|
||||
|
||||
plugins: [new webpack.ProgressPlugin(), new HtmlWebpackPlugin()],
|
||||
plugins: [new webpack.ProgressPlugin(), new HtmlWebpackPlugin()],
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /.(js|jsx)$/,
|
||||
include: [path.resolve(__dirname, 'src/scripts')],
|
||||
loader: 'babel-loader',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /.(js|jsx)$/,
|
||||
include: [path.resolve(__dirname, 'src/scripts')],
|
||||
loader: 'babel-loader',
|
||||
|
||||
options: {
|
||||
plugins: ['syntax-dynamic-import'],
|
||||
options: {
|
||||
plugins: ['syntax-dynamic-import'],
|
||||
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: false,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendors: {
|
||||
priority: -10,
|
||||
test: /[\\/]node_modules[\\/]/
|
||||
}
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendors: {
|
||||
priority: -10,
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
},
|
||||
},
|
||||
|
||||
chunks: 'async',
|
||||
minChunks: 1,
|
||||
minSize: 30000,
|
||||
name: true
|
||||
}
|
||||
},
|
||||
chunks: 'async',
|
||||
minChunks: 1,
|
||||
minSize: 30000,
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
|
||||
devServer: {
|
||||
open: true
|
||||
}
|
||||
devServer: {
|
||||
open: true,
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user