Skip to content

Commit

Permalink
Merge pull request #3 from shellyln/migrate-to-webpack-5
Browse files Browse the repository at this point in the history
Migrate to webpack 5
  • Loading branch information
shellyln authored Oct 25, 2020
2 parents 768a388 + cbf055a commit 5529c3b
Show file tree
Hide file tree
Showing 9 changed files with 7,964 additions and 2,379 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [10, 12, 13, 14]
os: [ubuntu-latest, macos-latest]
node_version: [10, 12, 14, 15]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v1
Expand All @@ -27,3 +27,27 @@ jobs:
npm run build:dist:dev
npm run build:dist:prod
npm test
artifact:
name: Build artifact
runs-on: ubuntu-latest
needs: [test]

steps:
- uses: actions/checkout@v1

- name: Use Node.js ${{ 12 }}
uses: actions/setup-node@v1
with:
node-version: ${{ 12 }}

- name: npm install, build
run: |
npm install -g npm
npm ci
npm run build:dist:dev
npm run build:dist:prod
- uses: actions/upload-artifact@master
with:
name: production-build
path: dist
10 changes: 5 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ test:lint:
script:
- npm run lint

# LTS
test:node:14:
image: node:14
test:node:15:
image: node:15
script:
- npm run clean
- npm run build
- npm run build:dist:dev
- npm run build:dist:prod
- npm test

test:node:13:
image: node:13
# LTS
test:node:14:
image: node:14
script:
- npm run clean
- npm run build
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: node_js
node_js:
- "10"
- "12"
- "13"
- "14"
- "15"

#branches:
# only:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Changelog


## v0.5.0

* Update dependencies.
* Update CI configurations.
* Migrate to webpack 5.


---


## v0.4.1

* Migrate to eslint.
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@
npm install fruitsconfits
```


> NOTICE:
> Use with `webpack >= 5`
>
> If you get the error:
>
> ```
> Module not found: Error: Can't resolve '(importing/path/to/filename)'
> in '(path/to/node_modules/path/to/dirname)'
> Did you mean '(filename).js'?`
> ```
>
> Add following setting to your `webpack.config.js`.
>
> ```js
> {
> test: /\.m?js/,
> resolve: {
> fullySpecified: false,
> },
> },
> ```
>
> On `webpack >= 5`, the extension in the request is mandatory for it to be fully specified
> if the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"'.
### Breakikng changes
See CHANGELOG.md.
Expand Down
Loading

0 comments on commit 5529c3b

Please sign in to comment.