@io-arc/webpack-loaders-js
A webpack loader for handling Babel and TypeScript.
#
Usageindex.ts
#
VariablesyamlLoader
#
Return: webpack.RuleSetRule
Read YAML files.
Install required of npm i -D yaml-loader
.
workerLoader
#
Return: webpack.RuleSetRule
Create a webWorker files.
Install required of npm i -D worker-loader
.
babelLoader
#
Return: webpack.RuleSetRule
Babel to JavaScript files.
Install required of npm i -D babel-loader @babel/core @babel/preset-env
#
FunctionsTypescriptLoader(vue)
#
Return: webpack.RuleSetRule
TypeScript to JavaScript files.
Parameters
params | type | default | description |
---|---|---|---|
vue (optional) | boolean | false | Using Vue.js |
Install of npm i -D ts-loader
EslintLoader(eslint)
#
Return: webpack.RuleSetRule
Using EsLint.
Install required of npm i -D eslint-loader
.
Parameters
params | type | default | description |
---|---|---|---|
eslint (optional) | string | '' | Eslint file path Eslint file of project root if empty |