module: {
rules: [
{
test: /\.js|jsx$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: [
"@babel/plugin-transform-react-jsx",
"@babel/plugin-proposal-class-properties"
]
}
}
}
$('html').on('click','.new',function () {
//code
});
new Date().getDate();
const path = require('path');
const gulp = require('gulp');
const plumber = require('gulp-plumber');
gulp.task('scripts', async function () {
gulp.src(path.resolve(__dirname,'src/js/background.js'))
.pipe(plumber())
...
.pipe(gulp.dest(path.resolve(__dirname,'dist/js')));