Browse Source

Adding dynamic import syntax, babel-polyfill by default, devserver port fix

v5.0.0-beta
Eli Perelman 8 years ago
parent
commit
34d845ae25
  1. 4
      packages/neutrino-preset-web/index.js
  2. 2
      packages/neutrino-preset-web/package.json
  3. 12
      packages/neutrino-preset-web/yarn.lock

4
packages/neutrino-preset-web/index.js

@ -37,6 +37,7 @@ module.exports = neutrino => {
neutrino.use(compileLoader, {
include: [SRC, TEST],
babel: {
plugins: [require.resolve('babel-plugin-syntax-dynamic-import')],
presets: [
[require.resolve('babel-preset-env'), {
modules: false,
@ -65,6 +66,7 @@ module.exports = neutrino => {
.target('web')
.context(CWD)
.entry('index')
.add(require.resolve('babel-polyfill'))
.add(join(SRC, 'index.js'));
config.output
@ -98,7 +100,7 @@ module.exports = neutrino => {
if (process.env.NODE_ENV === 'development') {
const protocol = !!process.env.HTTPS ? 'https' : 'http';
const host = process.env.HOST || pathOr('localhost', ['neutrino', 'config', 'devServer', 'host'], PKG);
const port = process.env.PORT || pathOr(5000, ['neutrino', 'config', 'devServer', 'post'], PKG);
const port = process.env.PORT || pathOr(5000, ['neutrino', 'config', 'devServer', 'port'], PKG);
neutrino.use(hot);
neutrino.use(devServer, {

2
packages/neutrino-preset-web/package.json

@ -15,6 +15,8 @@
"homepage": "https://neutrino.js.org",
"bugs": "https://github.com/mozilla-neutrino/neutrino-dev/issues",
"dependencies": {
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.1.10",
"exports-loader": "^0.6.4",
"imports-loader": "^0.7.1",

12
packages/neutrino-preset-web/yarn.lock

@ -249,6 +249,10 @@ babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
babel-plugin-syntax-dynamic-import@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"
babel-plugin-syntax-exponentiation-operator@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
@ -454,6 +458,14 @@ babel-plugin-transform-strict-mode@^6.22.0:
babel-runtime "^6.22.0"
babel-types "^6.22.0"
babel-polyfill@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
dependencies:
babel-runtime "^6.22.0"
core-js "^2.4.0"
regenerator-runtime "^0.10.0"
babel-preset-env@^1.1.10:
version "1.1.10"
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.1.10.tgz#c1055b69d25c3cf5383a925ee5c553c323558368"

Loading…
Cancel
Save