Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build & add node 10 #64

Merged
merged 3 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: node_js
node_js:
- 9
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like some modules are only compatible with LTS versions of node so I also removed 9 & 7

error get-caller-file@2.0.5: The engine "node" is incompatible with this module. Expected version "6.* || 8.* || >= 10.*".

- 12
- 10
- 8
- 7
- 6
cache: yarn
script:
Expand Down
16 changes: 4 additions & 12 deletions example/webpack1-babel/webpack.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,17 @@ module.exports = {
main: './test/main_test',
},

plugins: [
new webpack.DefinePlugin({ __VALUEA__: 10 }),
],
plugins: [new webpack.DefinePlugin({__VALUEA__: 10})],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for this noise; I'm guessing this was prettier kicking in since I changed this file?


output: {
path: path.resolve(__dirname, './dest'),
filename: 'bundle.js',
filename: '[name].js',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the fix for the aforementioned karma-webpack issue. In 3.0.0 (which was the latest version the last time inject-loader was released), this filename was always hardcoded to [name], but then that changed with codymikol/karma-webpack#336, which also introduced the error we're seeing now. Unfortunately, the fix never made it into a 3.x release so we could either pin to karma-webpack 3.0.0 or make the change I made here.

},

resolve: {
root: [
path.resolve(__dirname, './src'),
path.resolve(__dirname, './test'),
],
root: [path.resolve(__dirname, './src'), path.resolve(__dirname, './test')],
extensions: ['', '.js'],
modules: [
__dirname,
path.resolve(__dirname, './node_modules'),
],
modules: [__dirname, path.resolve(__dirname, './node_modules')],
},

resolveLoader: {
Expand Down
6 changes: 2 additions & 4 deletions example/webpack2-babel/webpack.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ module.exports = {
main: './test/main_test',
},

plugins: [
new webpack.DefinePlugin({ __VALUEA__: 10 }),
],
plugins: [new webpack.DefinePlugin({__VALUEA__: 10})],

output: {
path: path.resolve(__dirname, './dest'),
filename: 'bundle.js',
filename: '[name].js',
},

resolve: {
Expand Down
2 changes: 1 addition & 1 deletion example/webpack3-babel/webpack.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {

output: {
path: path.resolve(__dirname, './dest'),
filename: 'bundle.js',
filename: '[name].js',
},

resolve: {
Expand Down
2 changes: 1 addition & 1 deletion example/webpack4-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"jsdom": "^11.7.0",
"karma-jasmine": "^1.1.1",
"karma-jsdom-launcher": "^6.1.3",
"karma-webpack": "^3.0.0",
"karma-webpack": "^4.0.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically, karma-webpack 3 isn't meant to be used with webpack 4 (codymikol/karma-webpack@c1c0ee2) so I bumped it for the webpack 4 example

"karma": "^2.0.0",
"webpack": "~4"
}
Expand Down
2 changes: 1 addition & 1 deletion example/webpack4-babel/webpack.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {

output: {
path: path.resolve(__dirname, './dest'),
filename: 'bundle.js',
filename: '[name].js',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is more for consistency with the the other examples, but we could technically use bundle.js here since the issue is fixed in karma-webpack 4

},

resolve: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"prettier": "^1.11.1",
"pretty-quick": "^1.4.1",
"source-map-support": "^0.5.4",
"webpack": "^4.5.0",
"webpack-cli": "^2.0.14"
"webpack": "^4.35.0",
"webpack-cli": "^3.3.5"
},
"peerDependencies": {
"webpack": "^1 || ^2 || ^3 || ^4"
Expand Down
Loading