Skip to content

Commit

Permalink
fix webpack-cli init loaders' regex
Browse files Browse the repository at this point in the history
  • Loading branch information
CroMarmot committed Mar 10, 2020
1 parent 8e90009 commit 4d6d022
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/generators/src/utils/languageSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function getEntryFolders(self): string[] {
export function getBabelLoader(includeFolders: string[]): Rule {
const include = includeFolders.map((folder: string): string => `path.resolve(__dirname, '${folder}')`);
return {
test: "/.(js|jsx)$/",
test: "/\\.(js|jsx)$/",
include,
loader: "'babel-loader'"
};
Expand All @@ -66,7 +66,7 @@ export function getBabelLoader(includeFolders: string[]): Rule {
export function getTypescriptLoader(includeFolders: string[]): Rule {
const include = includeFolders.map((folder: string): string => `path.resolve(__dirname, '${folder}')`);
return {
test: "/.(ts|tsx)?$/",
test: "/\\.(ts|tsx)$/",
loader: "'ts-loader'",
include,
exclude: ["/node_modules/"]
Expand Down

0 comments on commit 4d6d022

Please sign in to comment.