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

webpack学习 #5

Open
manxisuo opened this issue Feb 10, 2017 · 0 comments
Open

webpack学习 #5

manxisuo opened this issue Feb 10, 2017 · 0 comments

Comments

@manxisuo
Copy link
Contributor

1. 使用Babel

npm install babel-loader babel-core babel-preset-es2015 webpack --save-dev

在webpack.config.js中:

module: {
  loaders: [
    {
      test: /\.js$/,
      exclude: /(node_modules|bower_components)/,
      loader: 'babel-loader',
      query: {
        presets: ['es2015']
      }
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant