walkontable.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. /**
  3. * Config responsible for building Walkontable (bundled into `src/3rdparty/walkontable/dist/`):
  4. * - walkontable.js
  5. */
  6. const path = require('path');
  7. const webpack = require('webpack');
  8. const configFactory = require('./base');
  9. const JasmineHtml = require('./plugin/jasmine-html');
  10. const wotPath = path.resolve(__dirname, '../src/3rdparty/walkontable');
  11. module.exports.create = function create(envArgs) {
  12. const config = {
  13. devtool: 'cheap-module-source-map',
  14. output: {
  15. library: 'Walkontable',
  16. libraryTarget: 'var',
  17. filename: 'walkontable.js',
  18. path: path.resolve(wotPath, 'dist'),
  19. },
  20. module: {
  21. rules: [
  22. {
  23. test: /\.js$/,
  24. loader: 'babel-loader',
  25. exclude: [
  26. /node_modules/,
  27. ],
  28. options: {
  29. cacheDirectory: true,
  30. },
  31. }
  32. ]
  33. },
  34. plugins: [
  35. // This helps ensure the builds are consistent if source code hasn't changed
  36. new webpack.optimize.OccurrenceOrderPlugin(),
  37. ],
  38. };
  39. return [].concat(config);
  40. }