Skip to content

Commit

Permalink
Update webpack configuration to downcompile SRE so es5 directory real…
Browse files Browse the repository at this point in the history
…ly is es5. (#899)
  • Loading branch information
dpvc committed Feb 21, 2023
1 parent 4464efc commit 16c6042
Show file tree
Hide file tree
Showing 3 changed files with 493 additions and 1,703 deletions.
5 changes: 3 additions & 2 deletions components/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ const MODULE = function (dir) {
return {
// NOTE: for babel transpilation
rules: [{
test: new RegExp(dirRE + quoteRE(path.sep) + '.*\\.js$'),
test: new RegExp('(?:' + dirRE + '|speech-rule-engine)' + quoteRE(path.sep) + '.*\\.js$'),
// test: new RegExp(dirRE + quoteRE(path.sep) + '.*\\.js$'),
exclude: new RegExp(quoteRE(path.join(path.dirname(__dirname), 'es5') + path.sep)),
use: {
loader: 'babel-loader',
Expand Down Expand Up @@ -160,7 +161,7 @@ const PACKAGE = function (name, js, libs, dir, dist) {
name = path.basename(name);
return {
name: name,
entry: path.join(dir, name + '.js'),
entry: ['regenerator-runtime/runtime.js', path.join(dir, name + '.js')],
output: {
path: distDir,
filename: name + (dist === '.' ? '.min.js' : '.js')
Expand Down
Loading

0 comments on commit 16c6042

Please sign in to comment.