@epilot360/webpack-config-epilot360 3.1.1 → 4.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -63,6 +63,8 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
63
63
|
`${opts.orgName}-${opts.projectName}.ts`
|
|
64
64
|
)
|
|
65
65
|
|
|
66
|
+
const useESM = Boolean(opts.useESM)
|
|
67
|
+
|
|
66
68
|
const fileExists = (path) => {
|
|
67
69
|
if (fs.existsSync(path)) return path
|
|
68
70
|
if (fs.existsSync(path + 'x')) return path + 'x'
|
|
@@ -74,13 +76,16 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
74
76
|
entry: fileExists(mfeEntrypoint) ?? fileExists(indexEntrypoint) ?? fileExists(legacyEntrypoint),
|
|
75
77
|
output: {
|
|
76
78
|
filename: `bundle.js`,
|
|
77
|
-
libraryTarget:
|
|
79
|
+
libraryTarget: useESM ? 'module' : 'system',
|
|
78
80
|
path: path.resolve(process.cwd(), "dist"),
|
|
79
81
|
uniqueName: opts.projectName,
|
|
80
82
|
devtoolNamespace: `${opts.projectName}`,
|
|
81
|
-
publicPath:
|
|
83
|
+
publicPath: useESM ? '' : 'auto',
|
|
82
84
|
chunkFilename: 'chunk-[name].[chunkhash].js',
|
|
83
85
|
},
|
|
86
|
+
experiments: {
|
|
87
|
+
outputModule: useESM,
|
|
88
|
+
},
|
|
84
89
|
module: {
|
|
85
90
|
rules: [
|
|
86
91
|
{
|
|
@@ -211,7 +216,6 @@ function webpackConfigEpilot360ReactApp(opts) {
|
|
|
211
216
|
"react-dom",
|
|
212
217
|
"axios",
|
|
213
218
|
"lodash",
|
|
214
|
-
"lodash/fp",
|
|
215
219
|
"js-yaml",
|
|
216
220
|
"handlebars",
|
|
217
221
|
"moment",
|
package/package.json
CHANGED