mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-30 20:01:15 +00:00
Webpack uses eslint on compile
This commit is contained in:
parent
24ddb46b95
commit
61a60c04a6
1 changed files with 9 additions and 3 deletions
|
@ -31,10 +31,16 @@ module.exports = {
|
|||
// Define how file types are handled by webpack
|
||||
module: {
|
||||
rules: [{
|
||||
// Pass application JS files through babel-loader, compiling to ES5
|
||||
test: /\.js$/, // Only compile .js files
|
||||
// Ensure eslint is run before compilation with babel
|
||||
enforce: 'pre',
|
||||
test: /\.js$/,
|
||||
// Only compile application files (dependencies are in ES5 already)
|
||||
exclude: /node_modules/,
|
||||
loader: 'eslint-loader'
|
||||
}, {
|
||||
// Pass application JS files through babel-loader, compiling to ES5
|
||||
test: /\.js$/,
|
||||
// Only compile application files (dependencies are in ES5 already)
|
||||
// include: [path.join(__dirname, './public/frontend')],
|
||||
exclude: /node_modules/,
|
||||
use: [{
|
||||
loader: 'babel-loader',
|
||||
|
|
Loading…
Reference in a new issue