Skip to content

Instantly share code, notes, and snippets.

@ATGardner
Created April 15, 2017 18:07
Show Gist options
  • Save ATGardner/b9209f32632fc4631718b1016f780d4e to your computer and use it in GitHub Desktop.
Save ATGardner/b9209f32632fc4631718b1016f780d4e to your computer and use it in GitHub Desktop.
// placed in /src folder
import 'babel-polyfill';
const rsLowerC = `[a-c\\xdf-\\xf6]`;
const rsUpperC = `[A-C\\xc0-\\xd6]`;
const working1 = rsLowerC + '+' + '(?=' + rsUpperC + ')';
const reWorking1 = RegExp(working1, 'g');
const rsLowerZ = `[a-z\\xdf-\\xf6]`;
const rsUpperZ = `[A-Z\\xc0-\\xd6]`;
const notWorking = rsLowerZ + '+' + '(?=' + [rsUpperZ].join('|') + ')';
const reNotWorking = RegExp(notWorking, 'g');
console.log('success');
const BabiliPlugin = require('babili-webpack-plugin');
const path = require('path');
module.exports = {
entry: './src/main.js',
output: {
path: path.join(__dirname, 'assets'),
filename: 'main.bundle.js',
library: 'main'
},
plugins: [
new BabiliPlugin(
{
// evaluate: false
}
)
],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: [['env']]
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment