Skip to content

Instantly share code, notes, and snippets.

@Vaccano
Created May 30, 2017
Embed
What would you like to do?
Source Map Will not Parse Issue
{
"license": "MIT",
"devDependencies": {
"@types/jest": "^19.2.2",
"@types/whatwg-fetch": "^0.0.33",
"aurelia-loader-nodejs": "^1.0.1",
"aurelia-pal-nodejs": "^1.0.0-beta.1.0.0",
"aurelia-tools": "^1.0.0",
"aurelia-webpack-plugin": "^2.0.0-rc.1",
"chai": "^3.5.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^3.2.4",
"css-loader": "^0.27.3",
"del-cli": "^0.2.1",
"expose-loader": "^0.7.3",
"file-loader": "^0.10.1",
"glob-copy": "^0.1.0",
"html-loader": "^0.4.5",
"html-webpack-plugin": "^2.28.0",
"jest": "^19.0.2",
"jest-teamcity-reporter": "^0.6.2",
"less": "^2.7.2",
"less-loader": "^4.0.2",
"mocha": "^3.2.0",
"raw-loader": "^0.5.1",
"sinon": "^2.1.0",
"source-map-loader": "^0.2.1",
"style-loader": "^0.16.1",
"ts-jest": "^19.0.13",
"ts-loader": "^2.0.3",
"typescript": "^2.2.2",
"url-loader": "^0.5.8",
"webpack": "2.2.1",
"webpack-dev-server": "^2.4.2",
"webpack-utf8-bom": "^1.0.3"
},
"dependencies": {
"aurelia-animator-css": "^1.0.1",
"aurelia-binding": "^1.2.1",
"aurelia-bootstrapper": "^2.1.1",
"aurelia-breeze": "^2.2.0",
"aurelia-dependency-injection": "^1.3.0",
"aurelia-dialog": "^1.0.0-beta.3.0.1",
"aurelia-event-aggregator": "^1.0.1",
"aurelia-fetch-client": "^1.1.2",
"aurelia-framework": "^1.1.1",
"aurelia-history": "^1.0.0",
"aurelia-history-browser": "^1.0.0",
"aurelia-http-client": "^1.1.0",
"aurelia-loader": "^1.0.0",
"aurelia-logging": "^1.3.1",
"aurelia-logging-console": "^1.0.0",
"aurelia-metadata": "^1.0.3",
"aurelia-pal-browser": "^1.2.0",
"aurelia-path": "^1.1.1",
"aurelia-polyfills": "^1.2.1",
"aurelia-route-recognizer": "^1.1.0",
"aurelia-router": "^1.2.1",
"aurelia-task-queue": "^1.2.0",
"aurelia-templating": "1.3.0",
"aurelia-templating-binding": "^1.3.0",
"aurelia-templating-resources": "^1.3.1",
"aurelia-templating-router": "^1.1.0",
"bluebird": "^3.5.0",
"bootstrap": "^3.3.7",
"breeze-client": "^1.6.3",
"css": "^2.2.1",
"font-awesome": "^4.7.0",
"jquery": "^3.2.1",
"moment": "^2.18.1",
"mousetrap": "^1.6.0",
"ms-signalr-client": "^2.2.5",
"reflect-metadata": "^0.1.10",
"whatwg-fetch": "^2.0.3"
},
"scripts": {
"go": "webpack -d --config webpack.config.js --watch --colors",
"prod-build": "SET NODE_ENV=production&&webpack -p --config webpack.config.js --colors",
"web": "webpack-dev-server --hot --inline",
"watch": "webpack -d --progress --profile --watch",
"watch:prod": "webpack -p --progress --profile --watch",
"build:dev": "webpack -d --progress --profile",
"prebuild:dev": "npm run clean:dist",
"build:prod": "webpack -p --progress --profile",
"clean": "npm cache clean && del-cli node_modules \"test/coverage\" dist",
"clean:dist": "del-cli dist",
"webpack": "cross-env TS_NODE_PROJECT=tsconfig.tsnode.json TS_NODE_FAST=true ./node_modules/.bin/webpack",
"webpack-dev-server": "cross-env TS_NODE_PROJECT=tsconfig.tsnode.json TS_NODE_FAST=true ./node_modules/.bin/webpack-dev-server",
"update-aurelia-breeze-typings": "node update-aurelia-breeze-typings.js",
"test": "node ./node_modules/jest/bin/jest.js --coverage",
"test-watch": "node ./node_modules/jest/bin/jest.js --watch",
"test-ci": "node ./node_modules/jest/bin/jest.js --coverage --no-cache",
"//": "NOTE: To Debug Tests: install 'Node Js Tools for Visual Studio', run the command below. Open Debug->Attach to process. Select 'NodeJs Remote Debugging' from the protocol list and enter 'localhost:5858#ping=0' into the Qualifier. Then select attach.",
"test-debug": "node --debug-brk ./node_modules/jest/bin/jest.js --runInBand"
},
"jest": {
"modulePaths": [
"<rootDir>/src",
"<rootDir>/node_modules"
],
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"transform": {
"^.+\\.(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testResultsProcessor": "./test/jest-multi-results-processor.js",
"testRegex": "\\.test\\.(ts|js)x?$",
"setupFiles": [
"<rootDir>/test/jest-pretest.ts"
],
"testEnvironment": "node",
"moduleNameMapper": {
"aurelia-(.*)": "<rootDir>/node_modules/$1"
}
}
}
const path = require('path');
const { AureliaPlugin, ModuleDependenciesPlugin } = require('aurelia-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const BomPlugin = require('webpack-utf8-bom');
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
module.exports = {
entry: 'aurelia-bootstrapper',
devtool: 'source-map',
output: {
path: path.resolve(__dirname, 'dist'),
publicPath: '/dist/',
filename: 'bundle.js'
},
resolve: {
extensions: ['.ts', '.js'],
modules: ['src', 'node_modules'].map(x => path.resolve(x))
},
module: {
rules: [
{ test: /\.css$/i, use: ['style-loader', 'css-loader'] },
{ test: /\.ts$/i, use: 'ts-loader' },
{ test: /\.html$/i, use: 'html-loader' },
{ test: /\.(png|gif|jpg|ico)$/i, use: 'url-loader?limit=8192' },
{ test: /\.(woff2|woff|ttf|eot|svg)(\?v=[a-z0-9]\.[a-z0-9]\.[a-z0-9])?$/, loader: 'url-loader?limit=100000' },
// Expose breeze globaly. This is needed to work with aurelia-breeze
// https://github.com/webpack-contrib/expose-loader
{ test: require.resolve('breeze-client'), use: [{ loader: 'expose-loader', options: 'breeze' }] }
]
},
plugins: [
new AureliaPlugin({
includeAll: 'src'
}),
new ModuleDependenciesPlugin({
"aurelia-dialog": ['./ai-dialog', './ai-dialog-header', './ai-dialog-body',
'./ai-dialog-footer', './attach-focus'
]
}),
new CopyPlugin([
{ from: 'index.html' },
{ from: 'web.config' },
{ from: 'plugins/log4javascript', to: 'plugins/log4javascript' }
]),
// https://www.npmjs.com/package/webpack-utf8-bom
// http://stackoverflow.com/questions/43130088/uncaught-syntaxerror-invalid-or-unexpected-token-%C3%AF
new BomPlugin(true),
new ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
"window.jQuery": 'jquery',
Promise: 'bluebird'
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment