Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit 3f0bbc5

Browse files
refactor: next (#198)
1 parent 2451157 commit 3f0bbc5

38 files changed

+1819
-1389
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ insert_final_newline = true
99
trim_trailing_whitespace = true
1010

1111
[*.md]
12-
insert_final_newline = true
1312
trim_trailing_whitespace = false

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,38 @@ module.exports = {
208208
};
209209
```
210210

211+
### `esModule`
212+
213+
Type: `Boolean`
214+
Default: `true`
215+
216+
By default, `file-loader` generates JS modules that use the ES modules syntax.
217+
There are some cases in which using ES modules is beneficial, like in the case of [module concatenation](https://webpack.js.org/plugins/module-concatenation-plugin/) and [tree shaking](https://webpack.js.org/guides/tree-shaking/).
218+
219+
You can enable a CommonJS module syntax using:
220+
221+
**webpack.config.js**
222+
223+
```js
224+
module.exports = {
225+
module: {
226+
rules: [
227+
{
228+
test: /\.css$/,
229+
use: [
230+
{
231+
loader: 'url-loader',
232+
options: {
233+
esModule: false,
234+
},
235+
},
236+
],
237+
},
238+
],
239+
},
240+
};
241+
```
242+
211243
## Contributing
212244

213245
Please take a moment to read our contributing guidelines if you haven't yet done so.

azure-pipelines.yml

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ trigger:
22
- master
33
- next
44

5+
variables:
6+
npm_config_cache: $(Pipeline.Workspace)/.npm
7+
58
jobs:
69
- job: Lint
710
pool:
8-
vmImage: ubuntu-16.04
11+
vmImage: ubuntu-latest
912
steps:
1013
- task: NodeTool@0
1114
inputs:
@@ -20,10 +23,12 @@ jobs:
2023
node -v
2124
npm -v
2225
displayName: 'Print versions'
23-
- task: Npm@1
26+
- task: CacheBeta@1
2427
inputs:
25-
command: custom
26-
customCommand: ci
28+
key: npm | $(Agent.OS) | package-lock.json
29+
path: $(npm_config_cache)
30+
displayName: 'Cache npm'
31+
- script: npm ci
2732
displayName: 'Install dependencies'
2833
- script: npm run lint
2934
displayName: 'Run lint'
@@ -34,23 +39,22 @@ jobs:
3439

3540
- job: Linux
3641
pool:
37-
vmImage: ubuntu-16.04
42+
vmImage: ubuntu-latest
3843
strategy:
3944
maxParallel: 4
4045
matrix:
46+
node-13:
47+
node_version: ^13.0.0
48+
webpack_version: latest
4149
node-12:
4250
node_version: ^12.0.0
4351
webpack_version: latest
4452
node-10:
4553
node_version: ^10.13.0
4654
webpack_version: latest
47-
node-8:
48-
node_version: ^8.9.0
49-
webpack_version: latest
50-
node-8-canary:
51-
node_version: ^8.9.0
55+
node-10-canary:
56+
node_version: ^10.13.0
5257
webpack_version: next
53-
continue_on_error: true
5458
steps:
5559
- task: NodeTool@0
5660
inputs:
@@ -65,10 +69,12 @@ jobs:
6569
node -v
6670
npm -v
6771
displayName: 'Print versions'
68-
- task: Npm@1
72+
- task: CacheBeta@1
6973
inputs:
70-
command: custom
71-
customCommand: ci
74+
key: npm | $(Agent.OS) | package-lock.json
75+
path: $(npm_config_cache)
76+
displayName: 'Cache npm'
77+
- script: npm ci
7278
displayName: 'Install dependencies'
7379
- script: npm i webpack@$(webpack_version)
7480
displayName: 'Install "webpack@$(webpack_version)"'
@@ -86,23 +92,22 @@ jobs:
8692

8793
- job: macOS
8894
pool:
89-
vmImage: macOS-10.14
95+
vmImage: macOS-latest
9096
strategy:
9197
maxParallel: 4
9298
matrix:
99+
node-13:
100+
node_version: ^13.0.0
101+
webpack_version: latest
93102
node-12:
94103
node_version: ^12.0.0
95104
webpack_version: latest
96105
node-10:
97106
node_version: ^10.13.0
98107
webpack_version: latest
99-
node-8:
100-
node_version: ^8.9.0
101-
webpack_version: latest
102-
node-8-canary:
103-
node_version: ^8.9.0
108+
node-10-canary:
109+
node_version: ^10.13.0
104110
webpack_version: next
105-
continue_on_error: true
106111
steps:
107112
- task: NodeTool@0
108113
inputs:
@@ -117,10 +122,12 @@ jobs:
117122
node -v
118123
npm -v
119124
displayName: 'Print versions'
120-
- task: Npm@1
125+
- task: CacheBeta@1
121126
inputs:
122-
command: custom
123-
customCommand: ci
127+
key: npm | $(Agent.OS) | package-lock.json
128+
path: $(npm_config_cache)
129+
displayName: 'Cache npm'
130+
- script: npm ci
124131
displayName: 'Install dependencies'
125132
- script: npm i webpack@$(webpack_version)
126133
displayName: 'Install "webpack@$(webpack_version)"'
@@ -138,23 +145,22 @@ jobs:
138145

139146
- job: Windows
140147
pool:
141-
vmImage: windows-2019
148+
vmImage: windows-latest
142149
strategy:
143150
maxParallel: 4
144151
matrix:
152+
node-13:
153+
node_version: ^13.0.0
154+
webpack_version: latest
145155
node-12:
146156
node_version: ^12.0.0
147157
webpack_version: latest
148158
node-10:
149159
node_version: ^10.13.0
150160
webpack_version: latest
151-
node-8:
152-
node_version: ^8.9.0
153-
webpack_version: latest
154-
node-8-canary:
155-
node_version: ^8.9.0
161+
node-10-canary:
162+
node_version: ^10.13.0
156163
webpack_version: next
157-
continue_on_error: true
158164
steps:
159165
- script: 'git config --global core.autocrlf input'
160166
displayName: 'Config git core.autocrlf'
@@ -172,10 +178,12 @@ jobs:
172178
node -v
173179
npm -v
174180
displayName: 'Print versions'
175-
- task: Npm@1
181+
- task: CacheBeta@1
176182
inputs:
177-
command: custom
178-
customCommand: ci
183+
key: npm | $(Agent.OS) | package-lock.json
184+
path: $(npm_config_cache)
185+
displayName: 'Cache npm'
186+
- script: npm ci
179187
displayName: 'Install dependencies'
180188
- script: npm i webpack@$(webpack_version)
181189
displayName: 'Install "webpack@$(webpack_version)"'

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = (api) => {
1010
'@babel/preset-env',
1111
{
1212
targets: {
13-
node: '8.9.0',
13+
node: '10.13.0',
1414
},
1515
},
1616
],

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
'*.js': ['prettier --write', 'eslint --fix', 'git add'],
3-
'*.{json,md,yml,css}': ['prettier --write', 'git add'],
3+
'*.{json,md,yml,css,ts}': ['prettier --write', 'git add'],
44
};

0 commit comments

Comments
 (0)