Use rollup instead of webpack for the full build
This commit is contained in:
21
config/rollup.js
Normal file
21
config/rollup.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// Rollup configuration for the full build
|
||||
|
||||
import noderesolve from 'rollup-plugin-node-resolve';
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import {uglify} from 'rollup-plugin-uglify';
|
||||
import buble from 'rollup-plugin-buble';
|
||||
import sourcemaps from 'rollup-plugin-sourcemaps';
|
||||
|
||||
export default {
|
||||
input: 'src/index.js',
|
||||
output: [
|
||||
{file: 'build/ol.js', format: 'iife', sourcemap: true}
|
||||
],
|
||||
plugins: [
|
||||
noderesolve(),
|
||||
commonjs(),
|
||||
buble(),
|
||||
uglify(),
|
||||
sourcemaps()
|
||||
]
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
const webpack = require('webpack');
|
||||
const MinifyPlugin = require('babel-minify-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
output: {
|
||||
filename: 'build/ol.js'
|
||||
},
|
||||
devtool: 'source-map',
|
||||
plugins: [
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
new MinifyPlugin()
|
||||
]
|
||||
};
|
||||
@@ -18,7 +18,7 @@
|
||||
"build-examples": "webpack --config examples/webpack/config.js --env=prod",
|
||||
"build-index": "node tasks/generate-index",
|
||||
"prebuild": "npm run build-index",
|
||||
"build": "webpack --config config/webpack.js",
|
||||
"build": "rollup --config config/rollup.js",
|
||||
"presrc-closure": "npm run prebuild",
|
||||
"src-closure": "node tasks/transform-types",
|
||||
"pretypecheck": "npm run src-closure",
|
||||
@@ -76,6 +76,12 @@
|
||||
"pixelmatch": "^4.0.2",
|
||||
"proj4": "2.4.4",
|
||||
"recast": "0.14.7",
|
||||
"rollup": "0.59.4",
|
||||
"rollup-plugin-buble": "0.19.2",
|
||||
"rollup-plugin-commonjs": "9.1.3",
|
||||
"rollup-plugin-node-resolve": "3.3.0",
|
||||
"rollup-plugin-sourcemaps": "0.4.2",
|
||||
"rollup-plugin-uglify": "4.0.0",
|
||||
"serve": "^7.0.0",
|
||||
"sinon": "^5.0.1",
|
||||
"url-polyfill": "^1.0.13",
|
||||
|
||||
Reference in New Issue
Block a user