Skip to content

Commit

Permalink
Remove unnecessary guidance for webpack
Browse files Browse the repository at this point in the history
We added this guidance for govuk-frontend v4.1.0 - when we added the ability to use ES Modules - because our imports were not fully specified (ie: they did not have file extensions). We've [fixed this for v4.1.1](alphagov/govuk-frontend#2658), and this guidance now looks to be unneeded.

Part of #194
  • Loading branch information
domoscargin committed Jun 16, 2022
1 parent aba43a4 commit 36266fa
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions source/importing-css-assets-and-javascript/index.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -204,26 +204,6 @@ If you need to import all of GOV.UK Frontend's components, then run the `initAll
import { initAll } from 'govuk-frontend'
initAll()
```

If you're using Webpack, you may need to add some or all of the following to your Webpack config file:

```json
resolve: {
extensions: ['.mjs'],
},
module: {
rules: [
{
test: /\.mjs$/,
type: 'javascript/auto',
resolve: {
fullySpecified: false
}
}
]
}
```

If you're using a bundler that uses CommonJS like [Browserify](http://browserify.org/), you should use `require`:

```javascript
Expand Down

0 comments on commit 36266fa

Please sign in to comment.