final touches webpack config
This commit is contained in:
parent
d95cc7eacf
commit
928dab41e8
@ -12,6 +12,9 @@ interface FindReplacePluginOptions {
|
||||
replace: { from: RegExp; to: string }[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple find and replace in assets plugin for Webpack
|
||||
*/
|
||||
class FindReplacePlugin {
|
||||
options: FindReplacePluginOptions;
|
||||
|
||||
@ -65,14 +68,12 @@ class FindReplacePlugin {
|
||||
}
|
||||
|
||||
const babelRule: RuleSetRule = {
|
||||
test: /\.(ts|js)$/,
|
||||
test: /\.(ts|js|mjs)$/,
|
||||
// https://webpack.js.org/loaders/babel-loader/#exclude-libraries-that-should-not-be-transpiled
|
||||
exclude: /node_modules/,
|
||||
// exclude: [
|
||||
// // \\ for Windows, / for macOS and Linux
|
||||
// /node_modules[\\/]core-js/,
|
||||
// /node_modules[\\/]webpack[\\/]buildin/,
|
||||
// ],
|
||||
exclude: [
|
||||
// \\ for Windows, / for macOS and Linux
|
||||
/node_modules[\\/]core-js/,
|
||||
],
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
@ -147,7 +148,7 @@ const config: Configuration = {
|
||||
*/
|
||||
{ from: /\[\^\\s\(\/\]/g, to: "[^\\s(\\/]" },
|
||||
{ from: /\[\\w\.\/\]/g, to: "[\\w.\\/]" },
|
||||
// [a-z_+-\/]
|
||||
{ from: /\[a-z_\+-\/\]/g, to: "[a-z_+-\\/]" },
|
||||
],
|
||||
}),
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user