mirror of
https://github.com/valentineus/iii-client.git
synced 2025-04-29 01:51:24 +03:00
Added assembly for the browser
This commit is contained in:
parent
a40cbab610
commit
5e4bfac39a
2
.babelrc
2
.babelrc
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
presets: ["es2015"],
|
presets: ["es2015"],
|
||||||
sourceMaps: "both",
|
sourceMaps: false,
|
||||||
comments: false
|
comments: false
|
||||||
}
|
}
|
@ -26,11 +26,15 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-cli": "^6.24.1",
|
"babel-cli": "^6.24.1",
|
||||||
"babel-core": "^6.24.1",
|
"babel-core": "^6.24.1",
|
||||||
|
"babel-loader": "^7.1.2",
|
||||||
"babel-preset-es2015": "^6.24.1",
|
"babel-preset-es2015": "^6.24.1",
|
||||||
"eslint": "^3.19.0"
|
"eslint": "^3.19.0",
|
||||||
|
"webpack": "^3.6.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "babel --source-maps --out-file ./dist/index.js ./src/index.js",
|
"build-node": "babel --out-file ./dist/index.js ./src/index.js",
|
||||||
|
"build-browser": "webpack --config webpack.config.js",
|
||||||
|
"build": "npm run build-browser && npm run build-node",
|
||||||
"check": "eslint ./src/*"
|
"check": "eslint ./src/*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25
webpack.config.js
Normal file
25
webpack.config.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
'use strict';
|
||||||
|
var webpack = require('webpack');
|
||||||
|
var path = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: path.resolve(__dirname, 'src/index.js'),
|
||||||
|
|
||||||
|
output: {
|
||||||
|
filename: 'bundle.js',
|
||||||
|
path: path.resolve(__dirname, 'dist')
|
||||||
|
},
|
||||||
|
|
||||||
|
module: {
|
||||||
|
rules: [{
|
||||||
|
test: /\.js$/,
|
||||||
|
exclude: /(node_modules|bower_components)/,
|
||||||
|
use: {
|
||||||
|
loader: 'babel-loader',
|
||||||
|
options: {
|
||||||
|
presets: ['es2015']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user