Skip to content

Commit

Permalink
infra(core): bundle from dist (#1973)
Browse files Browse the repository at this point in the history
- we have a bundle task that occurs right before publishing (prepack).
- make sure it uses dist to support upcoming esm migration.
- allows us to remove ts-tools altogether.
  • Loading branch information
AviVahl authored Aug 9, 2023
1 parent 8693042 commit c720536
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 24 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@file-services/types": "^8.1.1",
"@stylable/cli": "^5.15.1",
"@stylable/webpack-plugin": "^5.15.1",
"@ts-tools/webpack-loader": "^5.0.1",
"@types/chai": "^4.3.5",
"@types/chai-as-promised": "^7.1.5",
"@types/cors": "^2.8.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/scripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const webpack = require('webpack');
const path = require('path');
const baseWebpackConfig = require('../../../webpack.config');

const entryPath = require.resolve('../src/index.ts');
const entryPath = require.resolve('../dist/index.js');
const outputPath = path.join(__dirname, '../dist/umd');

function getConfigForMode(mode) {
Expand Down
3 changes: 0 additions & 3 deletions packages/core/webpack.config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ module.exports = {
output: {
filename: '[name].web.js',
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json'],
},
plugins: [
new HtmlWebpackPlugin({
filename: `iframe.html`,
Expand Down
7 changes: 0 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const { StylableWebpackPlugin } = require('@stylable/webpack-plugin');
module.exports = {
context: __dirname,
devtool: 'source-map',
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json'],
},
module: {
rules: [
{
Expand All @@ -15,10 +12,6 @@ module.exports = {
loader: 'source-map-loader',
exclude: /node_modules/,
},
{
test: /\.tsx?$/,
loader: '@ts-tools/webpack-loader',
},
{
test: /\.(png|jpg|gif|svg)$/i,
type: 'asset',
Expand Down
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -903,18 +903,6 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==

"@ts-tools/transpile@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@ts-tools/transpile/-/transpile-5.0.1.tgz#04bba2e7cbfe411f15473681bc6e4b91b03a056a"
integrity sha512-+Qj+nvg4n/Bf2GHoMUoNC7VI6jAFezHpwe6SegJLSZA8ARdFjtpKAg87Q95FsZpgsmNwlRmJTD4hp9MaWkxEgA==

"@ts-tools/webpack-loader@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@ts-tools/webpack-loader/-/webpack-loader-5.0.1.tgz#1551d2f3885872d792a3494a3c58defd787ce661"
integrity sha512-GeACyTpW1lHhRCms4uktH8BcgHm4eMv2SS61PyMgEJdlG2N25aH0WL9kiZ4KTQXqbhauSns4VZOhENn+fwrRdg==
dependencies:
"@ts-tools/transpile" "^5.0.1"

"@tufjs/canonical-json@1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31"
Expand Down

0 comments on commit c720536

Please sign in to comment.