'@babel/plugin-proposal-class-properties' webpack
const path = require('path');
const webpack = require('webpack');
module.exports = {
target: 'node',
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
entry: [ './src/index.js' ],
output: {
path: path.resolve(__dirname, 'build'),
filename: 'index.js',
library: 'index',
libraryTarget: 'commonjs2'
},
plugins: [
new webpack.IgnorePlugin(/^pg-native$/),
new webpack.DefinePlugin({
'process.env.BROWSER': false,
__DEV__: process.env.NODE_ENV !== 'production',
}),
],
module: {
rules: [
{
test: /\.(mjs|js|jsx)$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-env',
{
plugins: [
'@babel/plugin-proposal-class-properties'
]
}
]
},
}
],
}
};
Also in JavaScript:
- how to name a javascript variable
- split string javascript
- react hooks delete item from array
- javascript access pushed element
- axios react
- error sending empty object express
- javascript beginning of today and yesterday
- jquery watch checkbox change
- jquery min
- removes null and false values from an array
- js settimeout
- javascript change url
- recursive inquirerjs prompts
- how to not wait until function response js
- nodejs fs delete non empty directory
- To set the dropdown default value using jquery
- how to add up all numbers in an array
- Material-ui Account Balance icon
- explain js es6
- jquery ajax responseText
- resizable in jquery interaction
- how to make a div sticky using js
- javascriopt initialize 2d array with size
- ajax open new tab with post