forked from jcgertig/date-input-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 11
/
webpack.config.js
45 lines (43 loc) · 1.57 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const path = require('path');
const ESLintPlugin = require('eslint-webpack-plugin');
module.exports = {
entry: './src/configurable-date-input-polyfill.js',
output: {
filename: 'configurable-date-input-polyfill.dist.js',
path: path.resolve(__dirname, 'dist'),
environment: {
arrowFunction: false, // The environment supports arrow functions.
bigIntLiteral: false, // The environment supports BigInt as literal.
destructuring: false, // The environment supports destructuring.
dynamicImport: false, // The environment supports an async import() function to import EcmaScript modules.
module: false, // The environment supports ECMAScript Module syntax to import ECMAScript modules.
const: false, // The environment supports const and let for variable declarations.
forOf: false, // The environment supports 'for of' iteration.
},
},
plugins: [new ESLintPlugin({
extensions: [`js`],
exclude: [
`/node_modules/`
],
})],
module: {
rules: [
{
test: /\.m?js$/,
exclude: /node_modules/,
use: [{
loader: "babel-loader",
options: {
presets: ['@babel/preset-env']
}
}]
},
{
test: /\.(s*)css$/,
exclude: /node_modules/,
use: ['style-loader', 'css-loader', 'sass-loader']
}
]
},
};