Skip to content

feat: Only compile bundled TS files #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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: 4 additions & 1 deletion src/webpack/resolveModuleRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ export default (isDevelopment: boolean, isLibrary: boolean): webpack.RuleSetRule
{
test: /\.ts(x?)$/,
include: SOURCE_PATH,
use: [{ loader: 'ts-loader' }],
use: [{
loader: 'ts-loader',
options: { onlyCompileBundledFiles: true },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did the same thing in another PR which is pending right now. It is not merged yet because I don't have time to test it. Did you test if it works correctly in real project?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Yup, I tested building a library and using it in the app.

}],
},
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{
Expand Down