Skip to content

Commit

Permalink
Merge pull request #96 from GoogleChromeLabs/fix-mjs-errors
Browse files Browse the repository at this point in the history
Fix errors arising from strict .mjs handling
  • Loading branch information
developit authored Jul 10, 2018
2 parents 835a537 + e8e151a commit acbc31b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,38 @@ module.exports = function (_, env) {
}
},
module: {
// Disable the default JavaScript handling:
defaultRules: [],
rules: [
{
oneOf: [
{
test: /(\.mjs|\.esm\.js)$/i,
type: 'javascript/esm',
resolve: {},
parser: {
harmony: true,
amd: false,
commonjs: false,
system: false,
requireInclude: false,
requireEnsure: false,
requireContext: false,
browserify: false,
requireJs: false,
node: false
}
},
{
type: 'javascript/auto',
resolve: {},
parser: {
system: false,
requireJs: false
}
}
]
},
{
test: /\.(scss|sass)$/,
loader: 'sass-loader',
Expand Down

0 comments on commit acbc31b

Please sign in to comment.