exposed frontexpress in the browser global context #2

This commit is contained in:
Camel Aissani 2016-09-08 23:19:07 +02:00
parent ef16262c24
commit 474274c71f
6 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,4 @@
{
"presets": ["es2015"]
"presets": ["es2015"],
"plugins": ["add-module-exports"]
}

View File

@ -1,3 +1,4 @@
index.js
frontexpress.min.js
test
coverage

2
frontexpress.min.js vendored

File diff suppressed because one or more lines are too long

1
index.js Normal file
View File

@ -0,0 +1 @@
import frontexpress from 'expose?frontexpress!./lib/frontexpress.js';

View File

@ -32,10 +32,13 @@
"babel-eslint": "^6.1.2",
"babel-istanbul": "^0.11.0",
"babel-loader": "^6.2.4",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.14.0",
"chai": "^3.5.0",
"eslint": "^3.1.0",
"eslint-loader": "^1.4.1",
"expose-loader": "^0.7.1",
"istanbul": "^0.4.4",
"mocha": "^2.5.3",
"rimraf": "^2.5.3",

View File

@ -1,15 +1,15 @@
var webpack = require('webpack');
var path = require('path');
import webpack from 'webpack';
import path from 'path';
var frontend = {
entry: path.join(__dirname, 'lib','frontexpress.js'),
export default {
entry: path.join(__dirname, 'index.js'),
output: {
path: __dirname,
filename: 'frontexpress.min.js'
},
module: {
loaders: [
{ test: /\.js/, loader: 'babel-loader' },
{ test: /\.js/, loader: 'babel-loader' }
]
},
plugins: [
@ -17,6 +17,4 @@ var frontend = {
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
};
module.exports = [frontend];
};