$ npm install
npm WARN deprecated babel-preset-latest@6.24.1: We're super ???? excited that you're trying to use ES2017+ syntax, but instead of making more yearly presets ???? , Babel now has a better preset tha t we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can sh ip native ES2015+ to user ???? ! We are also in the process of releasing v7, so please give http:// babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel ????, please give us a follow on Twitter @babeljs for news on Babel, join slack.babelj s.io for discussion/development and help support the project at opencollective.com/babel
npm WARN deprecated babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated babel-preset-es2017@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated babel-preset-es2016@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
$ npm uninstall --save-dev babel-preset-es2015
npm WARN deprecated babel-preset-latest@6.24.1: We're super ???? excited that you're trying to use ES2017+ syntax, but instead of making more yearly presets ???? , Babel now has a better preset tha t we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can sh ip native ES2015+ to user ???? ! We are also in the process of releasing v7, so please give http:// babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel ????, please give us a follow on Twitter @babeljs for news on Babel, join slack.babelj s.io for discussion/development and help support the project at opencollective.com/babel
npm WARN deprecated babel-preset-es2016@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated babel-preset-es2017@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
$ npm install --save-dev babel-preset-env@next
npm WARN deprecated babel-plugin-transform-unicode-property-regex@2.0.5: Use @babel/plugin-proposal -unicode-property-regex instead.
npm notice created a lockfile as package-lock.json. You should commit this file.
+ babel-preset-env@7.0.0-beta.3
added 97 packages in 51.304s
同时将.babelrc 文件中“es2015”修改“env”:
{
"presets": [
["latest", {
"env": { "modules": false }
}]
]
}
$ npm install
npm WARN deprecated babel-preset-latest@6.24.1: We're super ???? excited that you're trying to use ES2017+ syntax, but instead of making more yearly presets ???? , Babel now has a better preset tha t we recommend you use instead: npm install babel-preset-env --save-dev. preset-env without options will compile ES2015+ down to ES5 just like using all the presets together and thus is more future proof. It also allows you to target specific browsers so that Babel can do less work and you can sh ip native ES2015+ to user ???? ! We are also in the process of releasing v7, so please give http:// babeljs.io/blog/2017/09/12/planning-for-7.0 a read and help test it out in beta! Thanks so much for using Babel ????, please give us a follow on Twitter @babeljs for news on Babel, join slack.babelj s.io for discussion/development and help support the project at opencollective.com/babel
npm WARN deprecated babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated babel-preset-es2016@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated babel-preset-es2017@6.24.1: ???? Thanks for using Babel: we recommend using ba bel-preset-env now: please read babeljs.io/env to update!
> node-sass@4.9.0 install H:\2018\demo\proj2-my-webpack-simple\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-57_binding.node
Download complete
Binary saved to H:\2018\demo\proj2-my-webpack-simple\node_modules\node-sass\vendor\win32-x64-57\binding.node
Caching binary to F:\develop\tools\develop\node\node_cache\node-sass\4.9.0\win32-x64-57_binding.node
> node-sass@4.9.0 postinstall H:\2018\demo\proj2-my-webpack-simple\node_modules\node-sass
> node scripts/build.js
Binary found at H:\2018\demo\proj2-my-webpack-simple\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.3: wanted {"os":"darwin","arch":"any"} (current: {" os":"win32","arch":"x64"})
added 960 packages in 104.192s
$ npm run dev
> proj2-my-webpack-simple@1.0.0 dev H:\2018\demo\proj2-my-webpack-simple
> cross-env NODE_ENV=development webpack-dev-server --open --hot
Project is running at http://localhost:8080/
webpack output is served from /dist/
404s will fallback to /index.html