Skip to content

Commit 1cb373a

Browse files
committed
fix: Fixed jq-web import
1 parent 751e7bc commit 1cb373a

File tree

6 files changed

+118
-120
lines changed

6 files changed

+118
-120
lines changed

package-lock.json

Lines changed: 109 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"lint:fix": "eslint src --fix",
1616
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text npm run test",
1717
"analyze": "webpack --profile --json > stats.json",
18-
"manual-test": "webpack-dev-server './src/manual_test.js' --hot --inline --output-filename 'test.js'",
18+
"manual-test": "webpack-dev-server --webpack-config webpack.test.config.js './src/manual_test.js' --hot --inline --output-filename 'test.js'",
1919
"semantic-release": "semantic-release",
2020
"test:e2e": "webpack src/manual_test.js --output-filename test.js --config webpack.config.js && mocha-webpack \"src/e2e-test.js\" --timeout 80000 --webpack-config webpack.test.config.js --require babel-polyfill"
2121
},
@@ -51,7 +51,7 @@
5151
"fake-style-loader": "^1.0.1",
5252
"file-loader": "^1.1.8",
5353
"hard-source-webpack-plugin": "^0.6.0",
54-
"html-webpack-plugin": "^2.30.1",
54+
"html-webpack-plugin": "^3.2.0",
5555
"inject-loader": "^4.0.1",
5656
"js-yaml": "^3.10.0",
5757
"jsdoc": "^3.5.5",

src/jq-web.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
const jq = async (...args) => {
3-
const jq_ = await import(/* webpackChunkName: "jq" */ 'jq-web')
4-
return jq_(...args)
3+
const jq_ = await import(/* webpackChunkName: "jq-web" */ 'jq-web')
4+
console.log(jq_) // eslint-disable-line
5+
return jq_.default(...args)
56
}
67

78
export default jq

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ module.exports = {
99
compress: true,
1010
port: 9000
1111
},
12-
entry: './src/index.js',
12+
entry: ["babel-polyfill", './src/index.js'],
1313
target: 'web',
14-
mode: 'production',
14+
mode: 'development',
1515
node: {
1616
fs: 'empty'
1717
},

webpack.screenshot.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const path = require('path');
22
const nodeExternals = require('webpack-node-externals');
33

44
module.exports = {
5-
entry: './src/index.js',
5+
entry: ["babel-polyfill", './src/index.js'],
66
target: 'web',
77
devtool: 'source-map',
88
mode: 'development',

webpack.test.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const path = require('path');
22
const nodeExternals = require('webpack-node-externals');
33

44
module.exports = {
5-
entry: './src/index.js',
5+
entry: ["babel-polyfill", './src/index.js'],
66
target: 'node',
77
mode: 'development',
88
externals: [nodeExternals()],

0 commit comments

Comments
 (0)