Skip to content

Commit

Permalink
fix(build): fixed failed import of .mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Agostino Marzotta committed Oct 21, 2020
1 parent b9091ae commit 13d0965
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module.exports = {
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.elm'],
extensions: ['.js', '.mjs', '.elm'],
},
module: {
strictExportPresence: true,
Expand All @@ -93,7 +93,7 @@ module.exports = {
exclude: [/[/\\\\]elm-stuff[/\\\\]/, /[/\\\\]node_modules[/\\\\]/],
include: paths.appSrc,
loader: require.resolve('babel-loader'),
query: {
options: {
presets: [
[
require.resolve('@babel/preset-env'),
Expand Down Expand Up @@ -227,6 +227,7 @@ module.exports = {
exclude: [
/\.html$/,
/\.js$/,
/\.mjs$/,
/\.elm$/,
/\.css$/,
/\.scss$/,
Expand Down
5 changes: 3 additions & 2 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ module.exports = {
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.elm'],
extensions: ['.js', '.mjs', '.elm'],
},
module: {
strictExportPresence: true,
Expand All @@ -149,7 +149,7 @@ module.exports = {
test: /\.js$/,
exclude: [/[/\\\\]elm-stuff[/\\\\]/, /[/\\\\]node_modules[/\\\\]/],
loader: require.resolve('babel-loader'),
query: {
options: {
// Latest stable ECMAScript features
presets: [
[
Expand Down Expand Up @@ -278,6 +278,7 @@ module.exports = {
exclude: [
/\.html$/,
/\.js$/,
/\.mjs$/,
/\.elm$/,
/\.css$/,
/\.scss$/,
Expand Down

0 comments on commit 13d0965

Please sign in to comment.