Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build/gulp/tasks/bundle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { task, series, parallel, src, dest } from 'gulp'
import babel from 'gulp-babel'
import sourcemaps from 'gulp-sourcemaps'
import { log, PluginError } from 'gulp-util'
import del from 'del'
import webpack from 'webpack'
Expand Down Expand Up @@ -34,13 +35,17 @@ const componentsSrc = [

task('bundle:package:commonjs', () =>
src(componentsSrc)
.pipe(sourcemaps.init())
.pipe(babel())
.pipe(sourcemaps.write('.'))
.pipe(dest(paths.packageDist(packageName, 'commonjs'))),
)

task('bundle:package:es', () =>
src(componentsSrc)
.pipe(sourcemaps.init())
.pipe(babel({ caller: { useESModules: true } } as any))
.pipe(sourcemaps.write('.'))
.pipe(dest(paths.packageDist(packageName, 'es'))),
)

Expand Down
1 change: 1 addition & 0 deletions build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"gulp-babel": "^8.0.0",
"gulp-cache": "^1.0.2",
"gulp-remember": "^1.0.1",
"gulp-sourcemaps": "^2.6.5",
"gulp-util": "^3.0.8",
"html-webpack-plugin": "^4.0.0-beta.5",
"jest": "^24.9.0",
Expand Down
1 change: 1 addition & 0 deletions packages/local-sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"copy-webpack-plugin": "^4.5.2",
"express": "^4.15.4",
"fork-ts-checker-webpack-plugin": "^1.3.3",
"source-map-loader": "^0.2.4",
"terser-webpack-plugin": "^1.4.3",
"typescript": "~3.7.2",
"webpack": "^4.35.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/local-sandbox/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ const webpackConfig: webpack.Configuration = {
devtool: 'source-map',
module: {
rules: [
{
test: /\.js$/,
use: ['source-map-loader'],
enforce: 'pre',
},
{
test: /\.(ts|tsx)$/,
loader: 'babel-loader',
Expand Down
Loading