Javascript Build Tools.xlsx - Java script Build Tools
Javascript Build Tools.xlsx - Java script Build Tools
Difficulty
Topic Subtopic Sam was working on Babel 6, Question
making use Text of the ES6 features.He
No. Javascript Level
1 Babel 6 Easy wants fruits
const to define a class'banana',
= ['apple', with a constructor
'orange'];method. Which of the
Build Tools
Javascript
2 Babel 6 Easy following
const code
newFruits snippets
= must
[...fruits,
Suppose that you want to transform he execute
'grape', 'kiwi'];
ES2015in order to dosyntax
modules so? in Babel
Build Tools
Javascript
3 Babel 6 Medium console.log(newFruits.length);
6. For this, you will have to use a plugin. Which of the following codes
Build Tools
Javascript }
4 Babel 6 Medium correctly
(} represents the implementation of that plugin?
Build Tools
Javascript
5 Babel 6 Hard While <ul>
working on Webpack, Dan wants to output the compiled bundle
Build Tools
Javascript
6 Webpack Easy to {listItems}
Will wants tofile
a specific location.
generate Which of
a source maptheforfollowing code snippets
the compiled JavaScriptmust
Build Tools
Javascript
7 Webpack Medium he
Joe execute
bundle wants toincompile
using order toalldo
Webpack. so?
Which
the offiles
.css the following code snippets
into a JavaScript must he
file named
Build Tools
Javascript
8 Webpack Hard execute in order to do so?
bundle.js. Which of the following code snippets must he execute in
Build Tools
Javascript import(./myModule).then(module => {
9 Webpack Hard order
// ... to do so?
Build Tools
Javascript console.log(module.default());
10 Webpack Medium optimization: {
Build Tools
Javascript
11 NPM Medium runtimeChunk: "single",
Build Tools
Javascript "npm ERR!
which codeto
you have ELIFECYCLE"
install the async pack and then exit early from
12 NPM Hard Mike
Build Tools
Javascript asyncwas flow.editing
Whichthe package.json
of the file while
following codes will working on NPM.
you execute There
in order to
13 NPM Easy are multiple fields in the file including the fields file. What should he
Build Tools
Javascript
14 NPM Hard specify in this field?
Build Tools
Javascript const chalk = require('chalk');
15 NPM Medium
Build Tools (async function() {
this.make =Option
make; A this.make Option
= make;B Option
this.make = make;C
this.model = model; this.model = model; this.model = model;
}
2plugins: ['@babel/plugin- 3} }plugins: ['@babel/plugin-syntax-
4
transform-es2015-modules-
transform-modules-commonjs'] import-meta']
commonjs']
It will display "Hello, World!" on the
};
It will throw an error. };will display an empty page.
It
It will display a list of numbers page. It will display a list of "undefined"
output: It will throw a compile time error.
from 1 to{5 on the page. path: '/dist', values
path:on the page.
'./dist',
output: { 'bundle.js',
filename:
},filename: 'bundle.js', filename: 'bundle.js', filename: 'bundle.js',
},rules: [ },rules: [
},rules: [ { {test file.css
{test file.css The default export of myModule is
Compile time error will be thrown Run timetest: error
/\.css$/,
will be thrown test: /\.css$/,
To split the runtime code into To prevent the runtime code from logged
To remove the runtime code from
multiple chunks being split into multiple chunks the main bundle
Insufficient disk space Incorrect if package dependencies
(deciderCondition()) { Incorrect node.js
return version
return
outerCallback(null)
outerCallback(null)
To specify the main file of the To list all
} the files that should be To specify the version of NULL
argument1= the
package
Hello! included
World in the package package
HelloWorld!
Success!
To resolve the IP address of a Error!
To resolve the DNS name of an IP Success!Error!
To resolve the hostname of a
domain name. address. server.
Correct
Option D class keyword is used Explanation
to create a class. There is
this.make = make; Answer
B noelements
5 keyword are likeadded
createClass. Henceincluding
to newFruits the otherthe 3
this.model = model;
5plugins: ['@babel/plugin- D codes will of
elements throw
fruitsanand
error.
2 new elements. So the
@babel/plugin-transform-modules-commonjs
output will be 5. is
transform-modules-syntax'] A
usedcode
The for the
willpurpose
throw an error as the return
};
It will display "Hello!" on the page. A
keyword is missing.
Since the return statement is missing, the code
It will throw a run time error. B object which allows the compiled
filename: 'bundle.js', will throw a compile-time error. bundle to be
filename: 'bundle.js', B output to the specified directory. Option A only
path: '/dist',
}, C specifies a filename for the bundle, and options C
Self Explanatory
rules: [ 'cheap-module-eval-
devtool: B Self Explanatory
Sinc, the name of the module isn't enclosed in
The {entire contents of myModule
A inverted
The commas, the
runtimeChunk code
option inwill
the throw a compile-
optimization
are logged the runtime code into a
To extract
D time
objecterror.
This error occurs when there is an issueused
of the Webpack configuration is withto
the
separate chunk
Incorrect npm script syntax D extract
npm the runtime
script, such as acode into a
missing orseparate
incorrectchunk.
return It can be done by calling an Async method inside
command.
A The "files" fieldfunction.
in a package.json file is used to
outerCallback(null)
To specify the dependencies of the another async
B specify an array of files that should be included in
package
Hello World!
C the
Self package
Explanatory when it is published
Success!Error!
To resolve the IP address of a module to wrap the Node.js dn.resolve4 method,
A
client. which returns a Promise that resolves with an
Reference link
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs
https://babeljs.io/docs/en/6.26.3/react
Changed the
https://babeljs.io/docs/en/6.26.3/react
question
https://webpack.js.org/configuration/output/#output-path
https://webpack.js.org/guides/getting-started/
https://webpack.js.org/loaders/css-loader/
Changed the
https://webpack.js.org/guides/code-splitting/#dynamic-imports
question
https://webpack.js.org/configuration/optimization/#optimizationruntimechunk
medium
https://docs.npmjs.com/common-errors#codeelifecycle
category
replaced with a
new question.
https://caolan.github.io/async/v3/docs.html#mapValues
replaced with a
https://caolan.github.io/async/v3/docs.html#mapValues
new question.
replaced with a
https://nodejs.org/dist/latest-v16.x/docs/api/dns.html#dns_dns_resolve4_hostname_options_callback
new question.